public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gary Oblock <gary@amperecomputing.com>
Cc: Gary Oblock via Gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: A ARM target question
Date: Wed, 22 Jun 2022 02:54:46 +0000	[thread overview]
Message-ID: <BYAPR01MB5464418F0CAB4012D0B2FB32C6B29@BYAPR01MB5464.prod.exchangelabs.com> (raw)

Well, regarding a sysroot I'm at a bit of a loss as to what to say.
Here is what the existing compiler (GCC 10 based) has for it's
config:

--build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-zephyr-eabi --prefix=/workdir/build/output/arm-zephyr-eabi --exec_prefix=/workdir/build/output/arm-zephyr-eabi --with-local-prefix=/workdir/build/output/arm-zephyr-eabi/arm-zephyr-eabi --with-headers=/workdir/build/output/arm-zephyr-eabi/arm-zephyr-eabi/include --with-newlib --enable-threads=no --disable-shared --with-pkgversion='crosstool-NG 1.24.0.378_e011758' --enable-__cxa_atexit --disable-tm-clone-registry --disable-libgomp --disable-libmudflap --disable-libmpx --disable-libssp --disable-libquadmath --disable-libquadmath-support --with-gmp=/workdir/build/build_arm/.build/arm-zephyr-eabi/buildtools --with-mpfr=/workdir/build/build_arm/.build/arm-zephyr-eabi/buildtools --with-mpc=/workdir/build/build_arm/.build/arm-zephyr-eabi/buildtools --with-isl=/workdir/build/build_arm/.build/arm-zephyr-eabi/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-target-optspace --disable-nls --enable-multiarch --with-multilib-list=rmprofile --enable-languages=c,c++ --with-gnu-ld --with-gnu-as --enable-initfini-array

I'm dealing with a zephyr customers SDK for everything and it's not like the paths i
in the parameters above correlate with anything I can find.

Note, the target above "arm-zephyr-eabi" is sane in that it works for a bit before things start to fail.

I tried

--prefix=$BASE/install --disable-bootstrap --enable-language=c --disable-multilib --target=arm-zephyr-eabi --with-sysroot=/home/garyzepher/zephyr/lib/libc

However, it seems that some of the include files (ac_nonexistent.h for instance) that it's looking for don't exist.

Thanks,

Gary

________________________________
From: Jonathan Wakely <jwakely.gcc@gmail.com>
Sent: Friday, June 17, 2022 4:59 AM
To: Gary Oblock <gary@amperecomputing.com>
Cc: Gary Oblock via Gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: A ARM target question

[EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.]


On Fri, 17 Jun 2022 at 06:34, Gary Oblock via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Stefan,
>
> I'm not at all clear which of those many config parameters are meaningfull.
>
> I borrowed  your --target and tried to build with this:
>
> ../sources/configure --prefix=$BASE/install --disable-bootstrap --enable-language=c --disable-multilib --target=arm-linux-gnueabihf
>
> That failed like this:
>
> echo | /home/gary/gcc_build_cross/objdir/./gcc/xgcc -B/home/gary/gcc_build_cross/objdir/./gcc/ -E -dM - | \
>   sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
> -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
>   sort -u > tmp-macro_list
> cc1: error: no include path in which to search for stdc-predef.h

Do you have a sysroot for the target?


> There was another error after this:
>
> checking for arm-linux-gnueabihf-gcc... /home/gary/gcc_build_cross/objdir/./gcc/xgcc -B/home/gary/gcc_build_cross/objdir/./gcc/ -B/home/gary/gcc_build_cross/install/arm-linux-gnueabihf/bin/ -B/home/gary/gcc_build_cross/install/arm-linux-gnueabihf/lib/ -isystem /home/gary/gcc_build_cross/install/arm-linux-gnueabihf/include -isystem /home/gary/gcc_build_cross/install/arm-linux-gnueabihf/sys-include
> checking for suffix of object files... configure: error: in `/home/gary/gcc_build_cross/objdir/arm-linux-gnueabihf/libgcc':
> configure: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details
> make[1]: *** [Makefile:15371: configure-target-libgcc] Error 1
>
> Any idea what went wrong? Note I looked at the config.log and there were lots of
> errors there too (not that they were helpful to me.)

You need to look in arm-linux-gnueabihf/libgcc/config.log not the
top-level config.log, and look for the "cannot compute suffix" error.

>
> Many years ago I set up a simple GCC cross compiler for mips
> as the starting point for the person creating a new target for a new chip.
> It didn't seems so crazy hard as this is proving to be.

It's not crazy hard, you just have to do the right steps in the right
order. It's not obvious, and not very well documented, but it's not
actually difficult. Just a few commands in the right order.

             reply	other threads:[~2022-06-22  2:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  2:54 Gary Oblock [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-14  4:57 Gary Oblock
2022-06-14 18:09 ` fedor_qd
2022-06-15 17:31 ` Stefan Ring
2022-06-16  9:06   ` Richard Earnshaw
     [not found]   ` <BYAPR01MB54649B0092B3C6403A697BC6C6AC9@BYAPR01MB5464.prod.exchangelabs.com>
     [not found]     ` <CAAxjCEzn+hm2eUShpaEmH9kLMo-rSTU71dNvMRmdqgt_wVvt2Q@mail.gmail.com>
2022-06-17  5:33       ` Gary Oblock
2022-06-17 11:59         ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR01MB5464418F0CAB4012D0B2FB32C6B29@BYAPR01MB5464.prod.exchangelabs.com \
    --to=gary@amperecomputing.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).