2
1
Эх сурвалжийг харах

Pass --static rather than -static in LDFLAGS when BR2_PREFER_STATIC_LIB

The following changes LDFLAGS from -static to --static if building
with BR2_PREFER_STATIC_LIB so that various components actually build
statically.

Libtool interpret -static as linking statically with libraries that will not
be installed to the libdir; you have to pass it -all-static to force static
linking.  Or, pass --static, which libtool passes on blindly to gcc.  gcc
and (GNU) ld both interpret --static the same as -static (although this
isn't documented).

Signed-off-by: Andy Kennedy <andy.kennedy@adtran.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
ANDY KENNEDY 12 жил өмнө
parent
commit
0a4bd19f4a
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      package/Makefile.in

+ 1 - 1
package/Makefile.in

@@ -319,7 +319,7 @@ endif
 
 ifeq ($(BR2_PREFER_STATIC_LIB),y)
 SHARED_STATIC_LIBS_OPTS=--enable-static --disable-shared
-TARGET_LDFLAGS += -static
+TARGET_LDFLAGS += --static
 else
 SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared
 endif