Thread: patch proposal for acinclude.m4 to better support gcc on illumos/smartos
As /usr/bin/ld on illumos doesn't (yet) support --as-needed, this patch to acinclude.m4 will suppress the LDFLAGS -Wl,-as-needed passed when gcc is used as the compiler in the "bash bootstrap" command. This patch assumes that all gcc variants running on illumos (gcc3 and gcc4) are configured with --without-gnu-ld --with-ld=/usr/bin/ld, which after brief research, seems typically the case. This has been tested and seems to work fine on oi_151a7 with gcc47 under pkgsrc http://pkgsrc.smartos.org/packages/illumos/2012Q3/All ~/src/pgadmin3$ git diff diff --git a/acinclude.m4 b/acinclude.m4 index e9c5a5d..c964e93 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -684,7 +684,9 @@ AC_DEFUN([SETUP_POSTGRESQL], case "${host}" in *-apple-darwin*) ;; - + *solaris*) + LDFLAGS="$LDFLAGS" + ;; *) LDFLAGS="$LDFLAGS -Wl,-as-needed" ;;
Attachment
Fwd: patch proposal for acinclude.m4 to better support gcc on illumos/smartos
From
Richard PALO
Date:
As this seemed to fall upon deaf ears, I'll reiterate my request for integration of the following patch which fixes the fact that the linker directive '-as-needed' is not supported by Solaris ld. -------- Message original -------- Sujet: patch proposal for acinclude.m4 to better support gcc on illumos/smartos Date : Fri, 19 Oct 2012 08:36:23 +0200 De : Richard PALO <richard.palo@baou.fr> Pour : pgadmin-hackers@postgresql.org Groupes de discussion: gmane.comp.db.postgresql.pgadmin.devel As /usr/bin/ld on illumos doesn't (yet) support --as-needed, this patch to acinclude.m4 will suppress the LDFLAGS -Wl,-as-needed passed when gcc is used as the compiler in the "bash bootstrap" command. This patch assumes that all gcc variants running on illumos (gcc3 and gcc4) are configured with --without-gnu-ld --with-ld=/usr/bin/ld, which after brief research, seems typically the case. This has been tested and seems to work fine on oi_151a7 with gcc47 under pkgsrc http://pkgsrc.smartos.org/packages/illumos/2012Q3/All ~/src/pgadmin3$ git diff diff --git a/acinclude.m4 b/acinclude.m4 index e9c5a5d..c964e93 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -684,7 +684,9 @@ AC_DEFUN([SETUP_POSTGRESQL], case "${host}" in *-apple-darwin*) ;; - + *solaris*) + LDFLAGS="$LDFLAGS" + ;; *) LDFLAGS="$LDFLAGS -Wl,-as-needed" ;;
Attachment
Re: Fwd: patch proposal for acinclude.m4 to better support gcc on illumos/smartos
From
Dave Page
Date:
Apologies - I guess I missed this. It's committed now - thanks! On Fri, Jul 19, 2013 at 7:51 AM, Richard PALO <richard.palo@baou.fr> wrote: > As this seemed to fall upon deaf ears, I'll reiterate my request for > integration of the following patch which fixes the fact that the linker > directive '-as-needed' is not supported by Solaris ld. > > > -------- Message original -------- > Sujet: patch proposal for acinclude.m4 to better support gcc on > illumos/smartos > Date : Fri, 19 Oct 2012 08:36:23 +0200 > De : Richard PALO <richard.palo@baou.fr> > Pour : pgadmin-hackers@postgresql.org > Groupes de discussion: gmane.comp.db.postgresql.pgadmin.devel > > > As /usr/bin/ld on illumos doesn't (yet) support --as-needed, this patch > to acinclude.m4 will suppress the LDFLAGS -Wl,-as-needed passed when gcc > is used as the compiler in the "bash bootstrap" command. > > This patch assumes that all gcc variants running on illumos (gcc3 and > gcc4) are configured with --without-gnu-ld --with-ld=/usr/bin/ld, > which after brief research, seems typically the case. > > This has been tested and seems to work fine on oi_151a7 with gcc47 under > pkgsrc http://pkgsrc.smartos.org/packages/illumos/2012Q3/All > > ~/src/pgadmin3$ git diff > diff --git a/acinclude.m4 b/acinclude.m4 > index e9c5a5d..c964e93 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -684,7 +684,9 @@ AC_DEFUN([SETUP_POSTGRESQL], > case "${host}" in > *-apple-darwin*) > ;; > - > + *solaris*) > + LDFLAGS="$LDFLAGS" > + ;; > *) > LDFLAGS="$LDFLAGS -Wl,-as-needed" > ;; > > > > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company