Re: Support LDFLAGS_SL on most ports - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: Support LDFLAGS_SL on most ports |
Date | |
Msg-id | 200410150509.i9F59uh02267@candle.pha.pa.us Whole thread Raw |
In response to | Support LDFLAGS_SL on most ports (Oliver Jowett <oliver@opencloud.com>) |
List | pgsql-patches |
I have applied your newest version of this patch, which I have attached. I also added code for Win32 and Cygwin. Thanks. --------------------------------------------------------------------------- Oliver Jowett wrote: > This patch includes LDFLAGS_SL in SHLIB_LINK on most ports (previously > it was only used on AIX and BeOS), and adds support for specifying it in > configure. > > 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. > > I haven't touched the win32/cygwin section of Makefile.shlib as I'm not > sure exactly where it'd be useful to add LDFLAGS_SL. > > -O > Index: src/Makefile.global.in > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/src/Makefile.global.in,v > retrieving revision 1.195 > diff -u -c -r1.195 Makefile.global.in > *** src/Makefile.global.in 18 Sep 2004 13:28:54 -0000 1.195 > --- src/Makefile.global.in 24 Sep 2004 06:23:11 -0000 > *************** > *** 199,204 **** > --- 199,205 ---- > with_gnu_ld = @with_gnu_ld@ > ld_R_works = @ld_R_works@ > LDFLAGS = @LDFLAGS@ > + LDFLAGS_SL = @LDFLAGS_SL@ > LDREL = -r > LDOUT = -o > RANLIB = @RANLIB@ > Index: src/Makefile.shlib > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/src/Makefile.shlib,v > retrieving revision 1.78 > diff -u -c -r1.78 Makefile.shlib > *** src/Makefile.shlib 2 Sep 2004 23:06:43 -0000 1.78 > --- src/Makefile.shlib 24 Sep 2004 06:23:12 -0000 > *************** > *** 276,282 **** > > # Normal case > $(shlib): $(OBJS) > ! $(LINK.shared) $(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) > --- 276,282 ---- > > # Normal case > $(shlib): $(OBJS) > ! $(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) > Index: configure.in > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/configure.in,v > retrieving revision 1.377 > diff -u -c -r1.377 configure.in > *** configure.in 17 Sep 2004 22:31:59 -0000 1.377 > --- configure.in 24 Sep 2004 06:23:12 -0000 > *************** > *** 531,536 **** > --- 531,538 ---- > > AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS]) > AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS]) > + AC_MSG_NOTICE([using LDFLAGS_SL=$LDFLAGS_SL]) > + AC_SUBST(LDFLAGS_SL) > > > AC_PROG_AWK > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: configure =================================================================== RCS file: /cvsroot/pgsql/configure,v retrieving revision 1.401 diff -c -c -r1.401 configure *** configure 11 Oct 2004 19:32:17 -0000 1.401 --- configure 15 Oct 2004 05:08:02 -0000 *************** *** 757,762 **** --- 757,766 ---- 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,886 **** --- 885,891 ---- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor + LDFLAGS_SL DOCBOOKSTYLE location of DocBook stylesheets *************** *** 3499,3504 **** --- 3504,3510 ---- 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,18888 **** --- 18889,18895 ---- 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 Index: configure.in =================================================================== RCS file: /cvsroot/pgsql/configure.in,v retrieving revision 1.380 diff -c -c -r1.380 configure.in *** configure.in 6 Oct 2004 09:35:19 -0000 1.380 --- configure.in 15 Oct 2004 05:08:04 -0000 *************** *** 532,537 **** --- 532,538 ---- AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS]) AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS]) + AC_ARG_VAR(LDFLAGS_SL) AC_PROG_AWK PGAC_PATH_FLEX Index: src/Makefile.global.in =================================================================== RCS file: /cvsroot/pgsql/src/Makefile.global.in,v retrieving revision 1.201 diff -c -c -r1.201 Makefile.global.in *** src/Makefile.global.in 11 Oct 2004 19:32:19 -0000 1.201 --- src/Makefile.global.in 15 Oct 2004 05:08:08 -0000 *************** *** 202,207 **** --- 202,208 ---- with_gnu_ld = @with_gnu_ld@ ld_R_works = @ld_R_works@ LDFLAGS = @LDFLAGS@ + LDFLAGS_SL = @LDFLAGS_SL@ LDREL = -r LDOUT = -o RANLIB = @RANLIB@ Index: src/Makefile.shlib =================================================================== RCS file: /cvsroot/pgsql/src/Makefile.shlib,v retrieving revision 1.84 diff -c -c -r1.84 Makefile.shlib *** src/Makefile.shlib 13 Oct 2004 10:20:04 -0000 1.84 --- src/Makefile.shlib 15 Oct 2004 05:08:09 -0000 *************** *** 272,278 **** # Normal case $(shlib): $(OBJS) ! $(LINK.shared) $(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) --- 272,278 ---- # Normal case $(shlib): $(OBJS) ! $(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,313 **** # 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) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a endif # PORTNAME == cygwin --- 307,313 ---- # Cygwin case $(shlib) lib$(NAME).a: $(OBJS) $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS) ! $(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,323 **** # 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) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a endif # PORTNAME == win32 --- 317,323 ---- # win32 case $(shlib) lib$(NAME).a: $(OBJS) $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS) ! $(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
pgsql-patches by date: