NetBSD Problem Report #39633
From www@NetBSD.org Sat Sep 27 10:25:02 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id AED6763BCED
for <gnats-bugs@gnats.netbsd.org>; Sat, 27 Sep 2008 10:25:02 +0000 (UTC)
Message-Id: <20080927102502.7E24763BC83@narn.NetBSD.org>
Date: Sat, 27 Sep 2008 10:25:02 +0000 (UTC)
From: rehsack@web.de
Reply-To: rehsack@web.de
To: gnats-bugs@NetBSD.org
Subject: [PATCH] Fix to ignore -Wl,-E on AIX for xlc
X-Send-Pr-Version: www-1.0
>Number: 39633
>Category: pkg
>Synopsis: [PATCH] Fix to ignore -Wl,-E on AIX for xlc
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Sep 27 10:30:00 +0000 2008
>Closed-Date: Thu Nov 06 21:38:43 +0000 2008
>Last-Modified: Thu Nov 06 21:38:43 +0000 2008
>Originator: Jens Rehsack
>Release: -
>Organization:
Bayer Business Services
>Environment:
AIX 5.3 TL8
>Description:
building shells/bash breaks at the first linker invocation because an invalid argument (-Wl,-E) will be passed.
>How-To-Repeat:
Build shells/bash on AIX using xlC
>Fix:
Index: mk/wrapper/cmd-sink-aix-cc
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/cmd-sink-aix-cc,v
retrieving revision 1.2
diff -u -r1.2 cmd-sink-aix-cc
--- mk/wrapper/cmd-sink-aix-cc 16 May 2005 17:54:51 -0000 1.2
+++ mk/wrapper/cmd-sink-aix-cc 27 Sep 2008 10:17:57 -0000
@@ -47,13 +47,14 @@
# into a path collection we can later append to command line
# using -blibpath.
##############################################################
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
+ -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*|-Wl,-E*)
case $arg in
-R*) R="-R" ;;
-Wl,-R*) R="-Wl,-R" ;;
-Wl,-rpath,*) R="-Wl,-rpath," ;;
-Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
-Wl,--rpath,*) R="-Wl,--rpath," ;;
+ -Wl,-E*) R="-Wl,-E" ;;
esac
dir="${arg#$R}"
case "$blibpath" in
Index: mk/wrapper/cmd-sink-aix-ld
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/cmd-sink-aix-ld,v
retrieving revision 1.2
diff -u -r1.2 cmd-sink-aix-ld
--- mk/wrapper/cmd-sink-aix-ld 16 May 2005 17:54:51 -0000 1.2
+++ mk/wrapper/cmd-sink-aix-ld 27 Sep 2008 10:17:57 -0000
@@ -47,13 +47,14 @@
# into a path collection we can later append to command line
# using -blibpath.
##############################################################
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
+ -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*|-Wl,-E*)
case $arg in
-R*) R="-R" ;;
-Wl,-R*) R="-Wl,-R" ;;
-Wl,-rpath,*) R="-Wl,-rpath," ;;
-Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
-Wl,--rpath,*) R="-Wl,--rpath," ;;
+ -Wl,-E*) R="-Wl,-E" ;;
esac
dir="${arg#$R}"
case $blibpath in
Index: mk/wrapper/cmd-sink-aix-xlc
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/cmd-sink-aix-xlc,v
retrieving revision 1.4
diff -u -r1.4 cmd-sink-aix-xlc
--- mk/wrapper/cmd-sink-aix-xlc 5 Oct 2007 18:19:45 -0000 1.4
+++ mk/wrapper/cmd-sink-aix-xlc 27 Sep 2008 10:17:57 -0000
@@ -45,13 +45,14 @@
# into a path collection we can later append to command line
# using -blibpath.
##############################################################
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
+ -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*|-Wl,-E*)
case $arg in
-R*) R="-R" ;;
-Wl,-R*) R="-Wl,-R" ;;
-Wl,-rpath,*) R="-Wl,-rpath," ;;
-Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
-Wl,--rpath,*) R="-Wl,--rpath," ;;
+ -Wl,-E*) R="-Wl,-E" ;;
esac
dir="${arg#$R}"
case $blibpath in
>Release-Note:
>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/39633: [PATCH] Fix to ignore -Wl,-E on AIX for xlc
Date: Sat, 27 Sep 2008 14:31:19 +0200
On Sat, Sep 27, 2008 at 10:30:00AM +0000, rehsack@web.de wrote:
> building shells/bash breaks at the first linker invocation because an
> invalid argument (-Wl,-E) will be passed.
The real question is what needs to be done to export symbols for use by
shared objects. This can be set in mk/platform/AIX.mk,
EXPORT_SYMBOLS_LDFLAGS. This might be compiler specific.
Joerg
From: Jens Rehsack <rehsack@web.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/39633: [PATCH] Fix to ignore -Wl,-E on AIX for xlc
Date: Sat, 27 Sep 2008 12:47:47 +0000
Joerg Sonnenberger wrote:
> The following reply was made to PR pkg/39633; it has been noted by GNATS.
>
> From: Joerg Sonnenberger <joerg@britannica.bec.de>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: pkg/39633: [PATCH] Fix to ignore -Wl,-E on AIX for xlc
> Date: Sat, 27 Sep 2008 14:31:19 +0200
>
> On Sat, Sep 27, 2008 at 10:30:00AM +0000, rehsack@web.de wrote:
> > building shells/bash breaks at the first linker invocation because an
> > invalid argument (-Wl,-E) will be passed.
>
> The real question is what needs to be done to export symbols for use by
> shared objects. This can be set in mk/platform/AIX.mk,
> EXPORT_SYMBOLS_LDFLAGS. This might be compiler specific.
Sure. And now? How do I differ in mk/platform/AIX.mk between gcc and xlc?
Can I differ there between different compiler versions (if there're
differences)? etc.
The documentation I found for all those things is very poor. Does a document
like a porters handbook exists which I've simply not found?
I sent you an e-mail yesterday related to this and a few other issues I ran
into build some pkg's using xlc as recommented. I would be glad to help
getting a permanent improvement and don't create results you finally can't use.
/Jens
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/39633: [PATCH] Fix to ignore -Wl,-E on AIX for xlc
Date: Sat, 27 Sep 2008 15:02:11 +0200
On Sat, Sep 27, 2008 at 12:55:02PM +0000, Jens Rehsack wrote:
> > > building shells/bash breaks at the first linker invocation because an
> > > invalid argument (-Wl,-E) will be passed.
> >
> > The real question is what needs to be done to export symbols for use by
> > shared objects. This can be set in mk/platform/AIX.mk,
> > EXPORT_SYMBOLS_LDFLAGS. This might be compiler specific.
>
> Sure. And now? How do I differ in mk/platform/AIX.mk between gcc and xlc?
I don't see a reason why the compiler makefiles shouldn't override it.
Can you try just setting it to empty?
> The documentation I found for all those things is very poor. Does a document
> like a porters handbook exists which I've simply not found?
None, this is the magical gut of the compiler.
I should add that the specific weiredness of the AIX linker was the
biggest issue for me as well, e.g. it is non-transitive.
Joerg
From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39633 CVS commit: pkgsrc/mk/platform
Date: Thu, 30 Oct 2008 18:52:08 +0000 (UTC)
Module Name: pkgsrc
Committed By: joerg
Date: Thu Oct 30 18:52:08 UTC 2008
Modified Files:
pkgsrc/mk/platform: AIX.mk
Log Message:
Don't set EXPORT_SYMBOLS_LDFLAGS on AIX, while it seems that GCC and
some newer linker versions seem to ignore it. It is not required anyway.
From PR 39633.
To generate a diff of this commit:
cvs rdiff -r1.32 -r1.33 pkgsrc/mk/platform/AIX.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Thu, 30 Oct 2008 18:56:58 +0000
State-Changed-Why:
Does it work as intended now?
From: Jens Rehsack <rehsack@web.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
gnats-admin@netbsd.org, joerg@NetBSD.org
Subject: Re: pkg/39633 ([PATCH] Fix to ignore -Wl,-E on AIX for xlc)
Date: Thu, 06 Nov 2008 21:15:00 +0000
joerg@NetBSD.org wrote:
> Synopsis: [PATCH] Fix to ignore -Wl,-E on AIX for xlc
>
> State-Changed-From-To: open->feedback
> State-Changed-By: joerg@NetBSD.org
> State-Changed-When: Thu, 30 Oct 2008 18:56:58 +0000
> State-Changed-Why:
> Does it work as intended now?
Finally the problem is gone - so it works and that was the intention ;-)
/Jens
State-Changed-From-To: feedback->closed
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Thu, 06 Nov 2008 21:38:43 +0000
State-Changed-Why:
Fixed. Thanks for the report.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.