From 4420bd9427175fabf5deee207f2421149d6b87d8 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 15 Jan 2011 10:41:35 +0100 Subject: [PATCH] Really enable the compiler detected flags into its correct var. --- configure | 41 +++++++++++++++++++---------------------- prog.mk | 2 +- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/configure b/configure index e768ed82..2161138a 100755 --- a/configure +++ b/configure @@ -241,20 +241,17 @@ done # # Check for some compiler flags. # -check_compiler_flag stack-protector-all f -if [ $? -ne 0 ]; then - check_compiler_flag stack-protector f -fi +check_compiler_flag stack-protector-all f CFLAGS if [ $? -eq 0 ]; then if [ "$CC" = "gcc" ]; then - check_compiler_flag "param ssp-buffer-size=1" - + check_compiler_flag "param ssp-buffer-size=1" - CFLAGS fi fi if [ $? -eq 0 ]; then - check_compiler_flag "_FORTIFY_SOURCE=2" D + check_compiler_flag "p,-D_FORTIFY_SOURCE=2" W fi check_compiler_flag "visibility=default" f SHAREDLIB_CFLAGS -check_compiler_flag "std=c99" +check_compiler_flag "std=c99" "" CFLAGS check_compiler_flag "l,--as-needed" W LDFLAGS # @@ -398,21 +395,6 @@ else fi fi -# -# OpenSSL libssl with pkg-config support is required. -# -printf "Checking for OpenSSL via pkg-config ... " -if ! $PKGCONFIG_BIN --exists libssl; then - echo "libssl.pc file not found, exiting." - exit 1 -else - echo "found version $($PKGCONFIG_BIN --modversion libssl)." - echo "CFLAGS += $($PKGCONFIG_BIN --cflags libssl)" >>$CONFIG_MK - echo "LDFLAGS += $($PKGCONFIG_BIN --libs libssl)" >>$CONFIG_MK - echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libssl)" \ - >>$CONFIG_MK -fi - # # libarchive >= 2.8.0 with pkg-config support is required. # @@ -441,6 +423,21 @@ else echo "STATIC_LIBS += -lfetch" >>$CONFIG_MK fi +# +# OpenSSL libssl with pkg-config support is required. +# +printf "Checking for OpenSSL via pkg-config ... " +if ! $PKGCONFIG_BIN --exists libssl; then + echo "libssl.pc file not found, exiting." + exit 1 +else + echo "found version $($PKGCONFIG_BIN --modversion libssl)." + echo "CFLAGS += $($PKGCONFIG_BIN --cflags libssl)" >>$CONFIG_MK + echo "LDFLAGS += $($PKGCONFIG_BIN --libs libssl)" >>$CONFIG_MK + echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libssl)" \ + >>$CONFIG_MK +fi + echo echo " XBPS has been configured with the following options:" echo diff --git a/prog.mk b/prog.mk index f193ac3a..a2ee63c4 100644 --- a/prog.mk +++ b/prog.mk @@ -36,7 +36,7 @@ endif $(BIN).static: $(OBJS) @printf " [CCLD]\t\t$@\n" - @$(CC) -static $^ $(CPPFLAGS) $(CFLAGS) -lxbps $(STATIC_LIBS) -o $@ + @$(CC) -static $^ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(STATIC_LIBS) -o $@ $(BIN): $(OBJS) @printf " [CCLD]\t\t$@\n"