20.04 on mac M1

Paul Smith paul at mad-scientist.net
Wed Oct 13 20:26:33 UTC 2021


On Wed, 2021-10-13 at 16:16 -0400, Jerry Geis wrote:
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/9/lto-wrapper
> Target: aarch64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-
> 17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-
> 9/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-
> c++,gm2 --prefix=/usr --with-gcc-major-ve
> rsion-only --program-suffix=-9 --program-prefix=aarch64-linux-gnu- --
> enable-shared --enable-linker-build-id --libexecdir=/usr/lib --
> without-included-gettext --enable-threads=posix --libdir=/usr/lib --
> enable-nls --enable-clocale=gnu 
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-
> libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --
> disable-libquadmath-support --enable-plugin --enable-default-pie --
> with-system-zlib --with-targ
> et-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --
> enable-fix-cortex-a53-843419 --disable-werror --enable-
> checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu
> --target=aarch64-linux-gnu
> Thread model: posix
> gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 

Unfortunately you stopped quoting just before the interesting parts.

Here's what I did:

  $ echo 'int main() { return 0; }' > /tmp/foo.c
  $ gcc -v -c -o /tmp/foo.o /tmp/foo.c

In the output you'll see a bunch of boilerplate as you quoted above,
then you will see something like I showed in my previous email:

  #include "..." search starts here:
  #include <...> search starts here:
    ...

followed by the default search paths.

> here are the outputs...  I guess I installed some of the cross -
> compilers thinking they were what I needed.

If you are trying to compile a program to run on the same system that
you are compiling on, then by definition you don't need a cross-
compiler.

And, these cross-compiler headers are only used if you invoke the
appropriate cross-compiler, not if you invoke the native compiler like
"gcc".

> Sounds like the file is not really present/needed on ARM ?

Seems so.  Any code that includes sys/* is highly questionable WRT
portability for sure.

Cheers!





More information about the ubuntu-users mailing list