Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4d94e99

Browse files
committed
> 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
1 parent 063216e commit 4d94e99

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

configure

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,10 @@ ac_env_CPP_set=${CPP+set}
757757
ac_env_CPP_value=$CPP
758758
ac_cv_env_CPP_set=${CPP+set}
759759
ac_cv_env_CPP_value=$CPP
760+
ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
761+
ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
762+
ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
763+
ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
760764
ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
761765
ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
762766
ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
@@ -881,6 +885,7 @@ Some influential environment variables:
881885
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
882886
headers in a nonstandard directory <include dir>
883887
CPP C preprocessor
888+
LDFLAGS_SL
884889
DOCBOOKSTYLE
885890
location of DocBook stylesheets
886891

@@ -3499,6 +3504,7 @@ echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
34993504
echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
35003505

35013506

3507+
35023508
for ac_prog in gawk mawk nawk awk
35033509
do
35043510
# 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
1888318889
s,@with_rendezvous@,$with_rendezvous,;t t
1888418890
s,@with_openssl@,$with_openssl,;t t
1888518891
s,@ELF_SYS@,$ELF_SYS,;t t
18892+
s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
1888618893
s,@AWK@,$AWK,;t t
1888718894
s,@FLEX@,$FLEX,;t t
1888818895
s,@FLEXFLAGS@,$FLEXFLAGS,;t t

configure.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.380 2004/10/06 09:35:19 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.381 2004/10/15 05:10:59 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -532,6 +532,7 @@ LDFLAGS="$LDFLAGS $LIBDIRS"
532532
AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS])
533533
AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])
534534

535+
AC_ARG_VAR(LDFLAGS_SL)
535536

536537
AC_PROG_AWK
537538
PGAC_PATH_FLEX

src/Makefile.global.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.201 2004/10/11 19:32:19 tgl Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.202 2004/10/15 05:11:00 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -202,6 +202,7 @@ LD = @LD@
202202
with_gnu_ld = @with_gnu_ld@
203203
ld_R_works = @ld_R_works@
204204
LDFLAGS = @LDFLAGS@
205+
LDFLAGS_SL = @LDFLAGS_SL@
205206
LDREL = -r
206207
LDOUT = -o
207208
RANLIB = @RANLIB@

src/Makefile.shlib

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.84 2004/10/13 10:20:04 momjian Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.85 2004/10/15 05:11:00 momjian Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -272,7 +272,7 @@ ifneq ($(PORTNAME), aix)
272272

273273
# Normal case
274274
$(shlib): $(OBJS)
275-
$(LINK.shared) $(OBJS) $(SHLIB_LINK) -o $@
275+
$(LINK.shared) $(LDFLAGS_SL) $(OBJS) $(SHLIB_LINK) -o $@
276276
# If we're using major and minor versions, then make a symlink to major-version-only.
277277
ifneq ($(shlib), $(shlib_major))
278278
rm -f $(shlib_major)
@@ -307,7 +307,7 @@ else # PORTNAME == cygwin
307307
# Cygwin case
308308
$(shlib) lib$(NAME).a: $(OBJS)
309309
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
310-
$(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
310+
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
311311
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
312312

313313
endif # PORTNAME == cygwin
@@ -317,7 +317,7 @@ else # PORTNAME == win32
317317
# win32 case
318318
$(shlib) lib$(NAME).a: $(OBJS)
319319
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
320-
$(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
320+
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
321321
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
322322

323323
endif # PORTNAME == win32

0 commit comments

Comments
 (0)