This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
build/2221: Build does not respect AR_FLAGS env. variable, fails
- From: "Daniel Richard G." <skunk at iSKUNK dot ORG>
- To: gdb-gnats at sources dot redhat dot com
- Date: 16 Jan 2007 19:38:35 -0000
- Subject: build/2221: Build does not respect AR_FLAGS env. variable, fails
- Reply-to: "Daniel Richard G." <skunk at iSKUNK dot ORG>
>Number: 2221
>Category: build
>Synopsis: Build does not respect AR_FLAGS env. variable, fails
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Jan 16 19:48:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: "Daniel Richard G." <skunk@iSKUNK.ORG>
>Release: gdb-6.6
>Organization:
>Environment:
AIX 5.3 (64-bit)
>Description:
When building 64-bit static libraries on AIX, ar(1) must be explicitly told to take 64-bit objects, otherwise it expects 32-bit input and chokes if it doesn't see same.
As such, I normally set AR_FLAGS="-X64 cru" in my environment, which addresses the problem cleanly with most autotoolized packages. The GDB build system, however, seems to use AR_FLAGS="rc" unconditionally---leading to an immediate build failure:
...
rm -f ./libiberty.a pic/./libiberty.a
ar rc ./libiberty.a \
./regex.o ./cplus-dem.o ./cp-demangle.o ...
ar: 0707-126 ./regex.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 ./cplus-dem.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
...
gmake[2]: *** [libiberty.a] Error 53
gmake[2]: Leaving directory `/tmp/gdb-6.6.build/libiberty'
gmake[1]: *** [all-libiberty] Error 2
gmake[1]: Leaving directory `/tmp/gdb-6.6.build'
gmake: *** [all] Error 2
>How-To-Repeat:
>Fix:
Don't set AR_FLAGS to a literal value in the makefile templates; handle it as another autoconf substitution.
>Release-Note:
>Audit-Trail:
>Unformatted: