[PATCH 2/2 v2] configure.ac: Move link only flags out of CFLAGS and into LDFLAGS.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7c04a4a..d35141c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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([
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux