Re: -arch: not found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jonathan,

I was suspecting the missing assembler too as I did not see the *-as
file in the $PREFIX/bin directory.  To add more color to this, I have:

1. Run the contrib/download_prerequisites script
2. Configured binutils with ../binutils-2.27/configure
--target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls
--disable-werror
3. Run `make` and `make install` in the new `build-binutils` directory

Is there a specific flag to create the assembler in the binutils config?

These are the files found in my new $PREFIX/bin directory:
x86_64-apple-darwin15.6.0-addr2line
x86_64-apple-darwin15.6.0-readelf
x86_64-apple-darwin15.6.0-ar
x86_64-apple-darwin15.6.0-size
x86_64-apple-darwin15.6.0-c++filt
x86_64-apple-darwin15.6.0-strings
x86_64-apple-darwin15.6.0-elfedit
x86_64-apple-darwin15.6.0-strip
x86_64-apple-darwin15.6.0-nm
x86_64-apple-darwin15.6.0-objcopy
x86_64-apple-darwin15.6.0-objdump
x86_64-apple-darwin15.6.0-ranlib

On Fri, Jan 6, 2017 at 7:31 AM, Nick Leli <nicholasleli@xxxxxxxxx> wrote:
> Hi Jonathan,
>
> I was suspecting the missing assembler too as I did not see the *-as file in
> the $PREFIX/bin directory.  To add more color to this, I have:
>
> 1. Run the contrib/download_prerequisites script
> 2. Configured binutils with ../binutils-2.27/configure --target=$TARGET
> --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
> 3. Run `make` and `make install` in the new `build-binutils` directory
>
> Is there a specific flag to create the assembler in the binutils config?
>
> These are the files found in my new $PREFIX/bin directory:
> x86_64-apple-darwin15.6.0-addr2line
> x86_64-apple-darwin15.6.0-readelf
> x86_64-apple-darwin15.6.0-ar
> x86_64-apple-darwin15.6.0-size
> x86_64-apple-darwin15.6.0-c++filt
> x86_64-apple-darwin15.6.0-strings
> x86_64-apple-darwin15.6.0-elfedit
> x86_64-apple-darwin15.6.0-strip
> x86_64-apple-darwin15.6.0-nm
> x86_64-apple-darwin15.6.0-objcopy
> x86_64-apple-darwin15.6.0-objdump
> x86_64-apple-darwin15.6.0-ranlib
>
>
> On Fri, Jan 6, 2017 at 2:28 AM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
> wrote:
>> On 5 January 2017 at 23:21, Nick Leli wrote:
>>> I am trying to compile GCC from Ubuntu, for Darwin by following this
>>> guide: http://wiki.osdev.org/GCC_Cross-Compiler#The_Build
>>>
>>> I have followed the steps but feel like I am missing something based
>>> on the comments from the configure suffix error I am receiving:
>>> https://gcc.gnu.org/wiki/FAQ#configure_suffix .
>>>
>>> Here are the steps I've taken:
>>> 1. Downloaded the gcc pre-requisites
>>
>> Just downloaded the tarballs? Built and installed them? Or run the
>> contrib/download_prerequisites script?
>>
>>> 2. Configured and built binutils from outside the source directory
>>
>> Just built, or built and installed?
>>
>>> 3. Configured and built gcc from outside the source directory, and
>>> separate from binutils.  The target used was the same target value I
>>> see on OSX 10.11.6 (x86_64-apple-darwin15.6.0)
>>> 4. Ensured the src/gcc-6.3.0 directory is in my path, so GMP/MPFR/MPC
>>> can be found
>>
>> This step is not necessary, there are no executables for GMP, MPFR or
>> MPC, so nothing to be found in your PATH.
>>
>>> 5. Deleted contents of build directory and started over with the steps
>>> above.
>>> 6. Ensured all pre-requisites are on the host:
>>> https://gcc.gnu.org/install/prerequisites.html
>>> 7. Attempted to configure gcc with --disable-werror
>>>
>>> I was under the impression that gcc can be built for any architecture,
>>> as long as you specify what you want to build it for.  Is there
>>> something additional I need to do in order to get a working compiler
>>> for a different architecture?  Any insight is greatly appreciated.
>>>
>>> Here is the gcc configure command I ran: ../gcc-6.3.0/configure
>>> --target=x86_64-apple-darwin15.6.0 --prefix="$PREFIX" --disable-nls
>>> --enable-languages=c --without-headers --disable-werror
>>>
>>> Here is the last error I'm seeing in
>>> $build_directory/x86_64-apple-darwin15.6.0/libgcc/config.log
>>>
>>> configure:3653: checking for suffix of object files
>>> configure:3675: /home/ubuntu/src/build-gcc/./gcc/xgcc
>>> -B/home/ubuntu/src/build-gcc/./gcc/
>>> -B/home/ubuntu/opt/cross/x86_64-apple-darwin15.6.0/bin/
>>> -B/home/ubuntu/opt/cross/x86_64-apple-darwin15.6.0/lib/ -isystem
>>> /home/ubuntu/opt/cross/x86_64-apple-darwin15.6.0/include -isystem
>>> /home/ubuntu/opt/cross/x86_64-apple-darwin15.6.0/sys-include    -c -g
>>> -O2  conftest.c >&5
>>> /home/ubuntu/src/build-gcc/./gcc/as: 106: exec: -arch: not found
>>
>> This suggests an assembler for the target was not found. Did you
>> install binutils? Is it either in $PREFIX or is $PREFIX/bin in your
>> PATH?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux