From: Bruce Momjian Date: Fri, 15 Oct 2004 05:11:00 +0000 (+0000) Subject: > This lets you do something like: X-Git-Tag: REL8_0_0BETA4~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d94e99b90c2353718b74beaebf5c852dcef9e09;p=postgresql > This lets you do something like: > > ./configure LDFLAGS=-static-libgcc LDFLAGS_SL=-static-libgcc > > to produce binaries that do not depend on libgcc_s.so at all. Oliver Jowett --- diff --git a/configure b/configure index cbe7d901ca..7ae60e8d39 100755 --- a/configure +++ b/configure @@ -757,6 +757,10 @@ ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set} +ac_env_LDFLAGS_SL_value=$LDFLAGS_SL +ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set} +ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set} ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set} @@ -881,6 +885,7 @@ Some influential environment variables: CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + LDFLAGS_SL DOCBOOKSTYLE location of DocBook stylesheets @@ -3499,6 +3504,7 @@ echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;} echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;} + for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -18883,6 +18889,7 @@ s,@with_pam@,$with_pam,;t t s,@with_rendezvous@,$with_rendezvous,;t t s,@with_openssl@,$with_openssl,;t t s,@ELF_SYS@,$ELF_SYS,;t t +s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t s,@AWK@,$AWK,;t t s,@FLEX@,$FLEX,;t t s,@FLEXFLAGS@,$FLEXFLAGS,;t t diff --git a/configure.in b/configure.in index bc4976f52d..b023cf9c03 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.380 2004/10/06 09:35:19 momjian Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.381 2004/10/15 05:10:59 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -532,6 +532,7 @@ LDFLAGS="$LDFLAGS $LIBDIRS" AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS]) AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS]) +AC_ARG_VAR(LDFLAGS_SL) AC_PROG_AWK PGAC_PATH_FLEX diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 49a684ad19..8f52a8dc87 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -1,5 +1,5 @@ # -*-makefile-*- -# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.201 2004/10/11 19:32:19 tgl Exp $ +# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.202 2004/10/15 05:11:00 momjian Exp $ #------------------------------------------------------------------------------ # All PostgreSQL makefiles include this file and use the variables it sets, @@ -202,6 +202,7 @@ LD = @LD@ with_gnu_ld = @with_gnu_ld@ ld_R_works = @ld_R_works@ LDFLAGS = @LDFLAGS@ +LDFLAGS_SL = @LDFLAGS_SL@ LDREL = -r LDOUT = -o RANLIB = @RANLIB@ diff --git a/src/Makefile.shlib b/src/Makefile.shlib index ac263bb860..8f01be4b18 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -6,7 +6,7 @@ # Copyright (c) 1998, Regents of the University of California # # IDENTIFICATION -# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.84 2004/10/13 10:20:04 momjian Exp $ +# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.85 2004/10/15 05:11:00 momjian Exp $ # #------------------------------------------------------------------------- @@ -272,7 +272,7 @@ ifneq ($(PORTNAME), aix) # Normal case $(shlib): $(OBJS) - $(LINK.shared) $(OBJS) $(SHLIB_LINK) -o $@ + $(LINK.shared) $(LDFLAGS_SL) $(OBJS) $(SHLIB_LINK) -o $@ # If we're using major and minor versions, then make a symlink to major-version-only. ifneq ($(shlib), $(shlib_major)) rm -f $(shlib_major) @@ -307,7 +307,7 @@ else # PORTNAME == cygwin # Cygwin case $(shlib) lib$(NAME).a: $(OBJS) $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS) - $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) + $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a endif # PORTNAME == cygwin @@ -317,7 +317,7 @@ else # PORTNAME == win32 # win32 case $(shlib) lib$(NAME).a: $(OBJS) $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS) - $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) + $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a endif # PORTNAME == win32