]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
configure.ac: Move link only flags out of CFLAGS and into LDFLAGS.
authorRandy Witt <rewitt@declaratino.com>
Fri, 16 Mar 2012 05:01:18 +0000 (01:01 -0400)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Sat, 17 Mar 2012 06:34:08 +0000 (03:34 -0300)
On the ARM gcc 4.2.2 I'm using I get many
"--as-needed: linker input file unused because linking not done"
style errors when libtool is using compile mode.

In order to silence these warnings and be "correct", the flags that
only make sense for linking were moved into LDFLAGS.

configure.ac

index 7c04a4a56e38051ca19d069a52b63cbc1f73bb6a..d35141cc4d99b6e4ef0f60f049396ee5b4ad0a61 100644 (file)
@@ -126,9 +126,11 @@ CC_CHECK_CFLAGS_APPEND([ \
                        -fdiagnostics-show-option \
                        -fvisibility=hidden \
                        -ffunction-sections \
-                       -fdata-sections \
-                       -Wl,--as-needed \
-                       -Wl,--gc-sections])
+                       -fdata-sections])
+
+CC_CHECK_LDFLAGS_APPEND([ \
+                        -Wl,--as-needed \
+                        -Wl,--gc-sections])
 
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([