Opened 8 years ago

Closed 8 years ago

#52079 closed defect (fixed)

gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.3.99
Keywords: leopard tiger Cc: neverpanic (Clemens Lang), jmroot (Joshua Root)
Port:

Description

MacPorts base fails to build with gcc-4.0 (Tiger, Leopard) or gcc-4.2 (Snow Leopard):

===> making all in src/darwintracelib1.0
cc -g -O2 -std=c99 -Wextra -Wall   -fPIC -arch i386 -arch ppc -DHAVE_CONFIG_H -I/opt/macports-base/src -I/opt/macports-base/src -I. -I/opt/macports-base/vendor/vendor-destroot//opt/bblocal/libexec/macports/include -MMD -MP  -c -o access.o access.c
cc -g -O2 -std=c99 -Wextra -Wall   -fPIC -arch i386 -arch ppc -DHAVE_CONFIG_H -I/opt/macports-base/src -I/opt/macports-base/src -I. -I/opt/macports-base/vendor/vendor-destroot//opt/bblocal/libexec/macports/include -MMD -MP  -c -o close.o close.c
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make[2]: *** [access.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make[2]: *** [close.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1

The problem only occurs when building MacPorts base universal, but MacPorts automatically builds base for the configured set of universal archs.

The problem is masked on Snow Leopard due to the use of clang, if available, ever since r111382. But clang is not available on Leopard or Tiger.

Change History (3)

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: cal@… added

The use of the -M flag was introduced in r141420. Maybe we can avoid using the -M flag, or otherwise we could build separately for each arch, then lipo.

comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmroot added
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.