URL:
<https://savannah.gnu.org/bugs/?59096>
Summary: The built in rule for archives fails on aix.
Project: make
Submitted by: dgoncharov
Submitted on: Чт 10 сен 2020 23:40:31
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: None
Operating System: None
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
$ cat makefile
all: libhello.a(a.o)
%.o: %.c
$(CC) -c -maix64 $<
a.c:
echo 'static int a;' >$@
$
$ make
gcc -c -maix64 a.c
ar rv libhello.a a.o
ar: Creating an archive file libhello.a.
a - a.o
ar: 0707-126 a.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
<builtin>: recipe for target 'libhello.a(a.o)' failed
make: *** [libhello.a(a.o)] Error 1
rm a.o
$
Aix ar requires an option to specify the object file format.
Quote from
https://www.ibm.com/support/knowledgecenter/ssw_aix_72/a_commands/ar.html
"-X mode Specifies the type of object file ar should examine. The mode
must be
one of the following:
32
Processes only 32-bit object files
64
Processes only 64-bit object files
32_64
Processes both 32-bit and 64-bit object files
d64
Examines discontinued 64-bit XCOFF files (magic number == U803XTOCMAGIC).
any
Processes all of the supported object files.
The default is to process 32-bit object files (ignore 64-bit objects). The
mode can also be set with the OBJECT_MODE environment variable. For example,
OBJECT_MODE=64 causes ar to process any 64-bit objects and ignore 32-bit
objects. The -X flag overrides the OBJECT_MODE variable."
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59096>
_______________________________________________
Сообщение отправлено по Savannah
https://savannah.gnu.org/