Opened 12 months ago

Last modified 12 months ago

#67360 new defect

gcc10-bootstrap @10.3.0_5+universal: as: I don't understand 'm' flag!

Reported by: Cebtenzzre Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: tiger Cc: catap (Kirill A. Korinsky)
Port: gcc10-bootstrap

Description

gcc10-bootstrap cannot compile a simple C source file on OS X Tiger:

void foo(void) {}

This is the error:

$ /opt/local/libexec/gcc10-bootstrap/bin/gcc -c foo.c
FATAL:/opt/local/bin/../libexec/as/i386/as: I don't understand 'm' flag!

This is the assembler invocation:

COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'foo.o' '-mmacosx-version-min=10.4'  '-nodefaultexport' '-mtune=core2'
 as -arch i386 -v -force_cpusubtype_ALL -mmacosx-version-min=10.4 -o foo.o /var/tmp//ccn56HXa.s
Apple Inc version cctools-localbuild, GNU assembler version 1.38

Change History (4)

comment:1 Changed 12 months ago by catap (Kirill A. Korinsky)

There seems to be something wrong with your environment.

Why do I think so? Because at https://trac.macports.org/ticket/67348 you're using this compiler and you're far away from the statement "cannot compile a simple C source file on OS X Tiger".

comment:2 Changed 12 months ago by Cebtenzzre

Based on the CMake logs, it looks like /opt/local/bin is not on the PATH during the configure step, so it uses the system assembler instead of MacPorts cctools:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/local/libexec/gcc10-bootstrap/bin/g++
Build flags: -pipe;-DNDEBUG
Id flags:

The output was:
1
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: Flag option -m has already been seen!
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'a' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'c' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: Flag option -o has already been seen!

If I take /opt/local/bin off of my PATH and compile foo.c, there are only warnings:

COLLECT_GCC_OPTIONS='-v' '-c' '-mmacosx-version-min=10.4'  '-nodefaultexport' '-mtune=core2'
 as -arch i386 -v -force_cpusubtype_ALL -mmacosx-version-min=10.4 -o foo.o /var/tmp//cc70u7pl.s
Apple Computer, Inc. version cctools-622.9~2, GNU assembler version 1.38
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: Flag option -m has already been seen!
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'a' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'c' flag!
/usr/bin/../libexec/gcc/darwin/i386/as: Flag option -o has already been seen!

For comparison, MacPorts gcc 7 passes different flags to 'as', and is compatible with MacPorts cctools:

COLLECT_GCC_OPTIONS='-v' '-c' '-mmacosx-version-min=10.4'  '-mtune=core2'
 /opt/local/bin/as -v -arch i386 -force_cpusubtype_ALL -o foo.o /var/tmp//ccxPW2mS.s
Apple Inc version cctools-localbuild, GNU assembler version 1.38

comment:3 in reply to:  2 Changed 12 months ago by catap (Kirill A. Korinsky)

Replying to Cebtenzzre:

Based on the CMake logs, it looks like /opt/local/bin is not on the PATH during the configure step, so it uses the system assembler instead of MacPorts cctools.

...

If I take /opt/local/bin off of my PATH and compile foo.c, there are only warnings:

...

For comparison, MacPorts gcc 7 passes different flags to 'as', and is compatible with MacPorts cctools:

Yes, it was intention. gcc10-bootstrap is special compiler with a lot of patches, see: https://github.com/gcc-mirror/gcc/compare/releases/gcc-10.4.0...catap:gcc:gcc10-bootstrap , and it doesn't include patches to support MacPorts' cctools.

comment:4 Changed 12 months ago by Cebtenzzre

I see, I didn't take that into account when I was running make directly. Assuming those assembler warnings are a purely cosmetic issue, this ticket can be closed.

Note: See TracTickets for help on using tickets.