Message ID | 20180705120020.31694-1-sebastian.huber@embedded-brains.de |
---|---|
State | New |
Headers | show |
Series | Update config.guess and config.sub | expand |
On 05/07/18 14:00, Sebastian Huber wrote: > * config.guess: Sync with upstream version 2018-06-26. > * config.sub: Sync with upstream version 2018-07-02. I would like to back port this also to GCC 8.
On Thu, 05 Jul 2018 05:00:20 PDT (-0700), sebastian.huber@embedded-brains.de wrote: > * config.guess: Sync with upstream version 2018-06-26. > * config.sub: Sync with upstream version 2018-07-02. > --- > config.guess | 6 +++--- > config.sub | 8 +++++++- > 2 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/config.guess b/config.guess > index 883a6713bf0..445c406836e 100755 > --- a/config.guess > +++ b/config.guess > @@ -2,7 +2,7 @@ > # Attempt to guess a canonical system name. > # Copyright 1992-2018 Free Software Foundation, Inc. > > -timestamp='2018-05-19' > +timestamp='2018-06-26' > > # This file is free software; you can redistribute it and/or modify it > # under the terms of the GNU General Public License as published by > @@ -894,8 +894,8 @@ EOF > # other systems with GNU libc and userland > echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" > exit ;; > - i*86:Minix:*:*) > - echo "$UNAME_MACHINE"-pc-minix > + *:Minix:*:*) > + echo "$UNAME_MACHINE"-unknown-minix > exit ;; > aarch64:Linux:*:*) > echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" > diff --git a/config.sub b/config.sub > index d1f5b549034..072700fb037 100755 > --- a/config.sub > +++ b/config.sub > @@ -2,7 +2,7 @@ > # Configuration validation subroutine script. > # Copyright 1992-2018 Free Software Foundation, Inc. > > -timestamp='2018-05-24' > +timestamp='2018-07-02' > > # This file is free software; you can redistribute it and/or modify it > # under the terms of the GNU General Public License as published by > @@ -1125,6 +1125,12 @@ case $basic_machine in > ps2) > basic_machine=i386-ibm > ;; > + riscv) > + basic_machine=riscv32-unknown > + ;; > + riscv-*) > + basic_machine=`echo "$basic_machine" | sed 's/^riscv/riscv32/'` > + ;; > rm[46]00) > basic_machine=mips-siemens > ;; I'm not sure what the policy is on getting config stuff approved for commit, but just FYI there's another RISC-V related patch to config.sub that changes the behavior of "riscv-*" tuples. I'm assuming we should take both, as it's odd to sync half way to the head of config. When I try to build it I see "Unsupported RISC-V target riscv-unknown-elf", so there's at least some extra autoconf wizadry that needs to happen in here. I'm actually not sure what the "riscv-*" tuples are supposed to do so I've added Liviu as I don't want to misrepresent his desires and get into trouble again :). I'm fine with pretty much anything when it comes to this tuple stuff, so feel free to consider it all pre-approved from a RISC-V prospective -- though I assume it needs a GCC global maintainer to approve it as well. My only constraint is that it doesn't break anything that currently builds, as I don't want to force a flag day on everyone because of this. Thanks for submitting the patch! Here's the config commit, for reference: commit dd5d5dd697df579a5ebd119a88475b446c07c6b0 Author: Ben Elliston <bje@gnu.org> Date: Tue Jul 3 21:18:29 2018 +1000 * config.sub: Do not rewrite riscv -> riscv32. * testsuite/config-sub.data: Adjust tests. diff --git a/ChangeLog b/ChangeLog index dc19a4b02ba6..db7a24b8a2a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-07-03 Liviu Ionescu <ilg@livius.net> + Ben Elliston <bje@gnu.org> + + * config.sub: Do not rewrite riscv -> riscv32. + * testsuite/config-sub.data: Adjust tests. + 2018-06-26 Sevan Janiyan <venture37@geeklan.co.uk> Ben Elliston <bje@gnu.org> diff --git a/config.sub b/config.sub index 072700fb037c..c95acc681d1b 100755 --- a/config.sub +++ b/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-07-02' +timestamp='2018-07-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -625,7 +625,7 @@ case $basic_machine in | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ - | riscv32 | riscv64 \ + | riscv | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -752,7 +752,7 @@ case $basic_machine in | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pru-* \ | pyramid-* \ - | riscv32-* | riscv64-* \ + | riscv-* | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ @@ -1125,12 +1125,6 @@ case $basic_machine in ps2) basic_machine=i386-ibm ;; - riscv) - basic_machine=riscv32-unknown - ;; - riscv-*) - basic_machine=`echo "$basic_machine" | sed 's/^riscv/riscv32/'` - ;; rm[46]00) basic_machine=mips-siemens ;; diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data index 7ad1f76b071e..5ab180774457 100644 --- a/testsuite/config-sub.data +++ b/testsuite/config-sub.data @@ -422,11 +422,11 @@ riscv64-elf riscv64-unknown-elf riscv64-hcos riscv64-unknown-hcos riscv64-linux riscv64-unknown-linux-gnu riscv64 riscv64-unknown-none -riscv-company-elf riscv32-company-elf -riscv-company-hcos riscv32-company-hcos -riscv-elf riscv32-unknown-elf -riscv-linux riscv32-unknown-linux-gnu -riscv riscv32-unknown-none +riscv-company-elf riscv-company-elf +riscv-company-hcos riscv-company-hcos +riscv-elf riscv-unknown-elf +riscv-linux riscv-unknown-linux-gnu +riscv riscv-unknown-none rl78-linux rl78-unknown-linux-gnu rl78 rl78-unknown-none rx-linux rx-unknown-linux-gnu
On 07/05/2018 06:00 AM, Sebastian Huber wrote: > * config.guess: Sync with upstream version 2018-06-26. > * config.sub: Sync with upstream version 2018-07-02. OK. And I think in general syncing to the latest version from upstream ought not require explicit approval. Richi/Jakub have the final decision about whether or not to backport to the gcc-8 branch. Jeff
On 07/05/2018 10:51 AM, Palmer Dabbelt wrote: > On Thu, 05 Jul 2018 05:00:20 PDT (-0700), > sebastian.huber@embedded-brains.de wrote: >> * config.guess: Sync with upstream version 2018-06-26. >> * config.sub: Sync with upstream version 2018-07-02. >> --- >> config.guess | 6 +++--- >> config.sub | 8 +++++++- >> 2 files changed, 10 insertions(+), 4 deletions(-) >> >> diff --git a/config.guess b/config.guess >> index 883a6713bf0..445c406836e 100755 >> --- a/config.guess >> +++ b/config.guess >> @@ -2,7 +2,7 @@ >> # Attempt to guess a canonical system name. >> # Copyright 1992-2018 Free Software Foundation, Inc. >> >> -timestamp='2018-05-19' >> +timestamp='2018-06-26' >> >> # This file is free software; you can redistribute it and/or modify it >> # under the terms of the GNU General Public License as published by >> @@ -894,8 +894,8 @@ EOF >> # other systems with GNU libc and userland >> echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed >> 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed >> -e 's/[-(].*//'`-$LIBC" >> exit ;; >> - i*86:Minix:*:*) >> - echo "$UNAME_MACHINE"-pc-minix >> + *:Minix:*:*) >> + echo "$UNAME_MACHINE"-unknown-minix >> exit ;; >> aarch64:Linux:*:*) >> echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" >> diff --git a/config.sub b/config.sub >> index d1f5b549034..072700fb037 100755 >> --- a/config.sub >> +++ b/config.sub >> @@ -2,7 +2,7 @@ >> # Configuration validation subroutine script. >> # Copyright 1992-2018 Free Software Foundation, Inc. >> >> -timestamp='2018-05-24' >> +timestamp='2018-07-02' >> >> # This file is free software; you can redistribute it and/or modify it >> # under the terms of the GNU General Public License as published by >> @@ -1125,6 +1125,12 @@ case $basic_machine in >> ps2) >> basic_machine=i386-ibm >> ;; >> + riscv) >> + basic_machine=riscv32-unknown >> + ;; >> + riscv-*) >> + basic_machine=`echo "$basic_machine" | sed 's/^riscv/riscv32/'` >> + ;; >> rm[46]00) >> basic_machine=mips-siemens >> ;; > > I'm not sure what the policy is on getting config stuff approved for > commit, but just FYI there's another RISC-V related patch to config.sub > that changes the behavior of "riscv-*" tuples. I'm assuming we should > take both, as it's odd to sync half way to the head of config. > > When I try to build it I see "Unsupported RISC-V target > riscv-unknown-elf", so there's at least some extra autoconf wizadry that > needs to happen in here. I'm actually not sure what the "riscv-*" > tuples are supposed to do so I've added Liviu as I don't want to > misrepresent his desires and get into trouble again :). > > I'm fine with pretty much anything when it comes to this tuple stuff, so > feel free to consider it all pre-approved from a RISC-V prospective -- > though I assume it needs a GCC global maintainer to approve it as well. > My only constraint is that it doesn't break anything that currently > builds, as I don't want to force a flag day on everyone because of this. > > Thanks for submitting the patch! > > Here's the config commit, for reference: > > commit dd5d5dd697df579a5ebd119a88475b446c07c6b0 > Author: Ben Elliston <bje@gnu.org> > Date: Tue Jul 3 21:18:29 2018 +1000 > > * config.sub: Do not rewrite riscv -> riscv32. > * testsuite/config-sub.data: Adjust tests. If this is from upstream, consider it pre-approved for the trunk. jeff
> On 5 Jul 2018, at 19:51, Palmer Dabbelt <palmer@sifive.com> wrote: > > ... When I try to build it I see "Unsupported RISC-V target riscv-unknown-elf", I guess configure is fine, you need to allow for the `riscv-` prefix in gcc/config.gcc, around line 3982 > so there's at least some extra autoconf wizadry that needs to happen in here. I'm actually not sure what the "riscv-*" tuples are supposed to do so I've added Liviu as I don't want to misrepresent his desires and get into trouble again :). > ... My only constraint is that it doesn't break anything that currently builds, as I don't want to force a flag day on everyone because of this. that's a reasonable desire. however I guess that automatically transforming riscv- into riscv32- will break my builds. if you take a look at the changes in my gcc fork, you'll see that later, in `config.gcc` I identify the `riscv-none-embed` tuple and provide a separate `elf-embed.h` instead of your `elf.h` which automatically links with libgloss. https://github.com/riscv/riscv-gcc/commit/5a282a3bc4e0f8700733dbf2c4d41aa528537e61 maybe this is not the best solution, but so far it worked. if you have a better proposal, I am ready to consider it. --- the requirements are simple: - the resulting names of the binaries should not include any {32|64}; the idea to rename the binaries after the build is not acceptable - the header file (elf.h) should be the edited one, which does not automatically link libgloss, since this is harmful for bare metal toolchains. --- if for now the `-embed` suffix is not yet part of the script, I think I can continue to define it locally in my fork, until we have a RISC-V EABI and I can use `riscv-none-eabi-`. however I think that adding it to the script is reasonable and might be also useful for other cross embedded toolchains that do not have an EABI. --- generally speaking, I think that John proposal to clearly differentiate between Linux native compilers and cross embedded toolchains should be considered, it seems that he has a deep understanding of the problem and can provide a good solution. regards, Liviu
On 07/05/2018 09:51 AM, Palmer Dabbelt wrote: > When I try to build it I see "Unsupported RISC-V target > riscv-unknown-elf", so there's at least some extra autoconf wizadry that > needs to happen in here. I'm actually not sure what the "riscv-*" > tuples are supposed to do so I've added Liviu as I don't want to > misrepresent his desires and get into trouble again :). I objected to this on the config.sub package mailing list, because it adds riscv-linux as a valid configure tuple, and we never wanted that. But this seems to be a losing battle. Jim
> On 5 Jul 2018, at 21:26, Jim Wilson <jimw@sifive.com> wrote: > > because it adds riscv-linux as a valid configure tuple, and we never wanted that If this is really a problem I guess you can blacklist it somehow. But this proves once again that Linux native compilers and cross embedded toolchains should be processed differently. Regards, Liviu
On Thu, Jul 5, 2018 at 11:31 AM, Liviu Ionescu <ilg@livius.net> wrote: > If this is really a problem I guess you can blacklist it somehow. > But this proves once again that Linux native compilers and cross embedded toolchains should be processed differently. It isn't a major problem. There is the issue that the more different configure triplets we have the more work I need to do to keep them all working. So from my viewpoint, I'd rather not have riscv-*, but now that we have it, I can fix the gcc config.sub to make it work. On the linux side, the expectation is that everyone will be using riscv64-linux, and we don't have any usable upstream riscv32-linux support yet, so there isn't any problem (yet). Jim
> On 5 Jul 2018, at 22:17, Jim Wilson <jimw@sifive.com> wrote: > > ... I can fix the gcc config.sub to make it work. Or you can edit `gcc/config.gcc` and trigger an error for `riscv-linux*`. Regards, Liviu
On Thu, Jul 5, 2018 at 12:22 PM, Liviu Ionescu <ilg@livius.net> wrote: >> On 5 Jul 2018, at 22:17, Jim Wilson <jimw@sifive.com> wrote: >> ... I can fix the gcc config.sub to make it work. > Or you can edit `gcc/config.gcc` and trigger an error for `riscv-linux*`. I added patches to binutils and gcc to make riscv-elf work. riscv-rtems probably also works as a result of this. I'm not worrying about riscv-linux for now. There may be more stuff that needs to be fixed to make riscv-* work though. I only checked binutils and gcc. Jim
On 07/05/2018 09:18 PM, Jim Wilson wrote: > On Thu, Jul 5, 2018 at 12:22 PM, Liviu Ionescu <ilg@livius.net> wrote: >>> On 5 Jul 2018, at 22:17, Jim Wilson <jimw@sifive.com> wrote: >>> ... I can fix the gcc config.sub to make it work. >> Or you can edit `gcc/config.gcc` and trigger an error for `riscv-linux*`. > > I added patches to binutils and gcc to make riscv-elf work. > riscv-rtems probably also works as a result of this. I'm not worrying > about riscv-linux for now. There may be more stuff that needs to be > fixed to make riscv-* work though. I only checked binutils and gcc. My tester bootstraps riscv64 linux via qemu/chroot once every 24hrs. If it fails, I'll pass that info along... jeff
On 05/07/18 18:51, Palmer Dabbelt wrote: > > I'm not sure what the policy is on getting config stuff approved for > commit, but just FYI there's another RISC-V related patch to > config.sub that changes the behavior of "riscv-*" tuples. I'm > assuming we should take both, as it's odd to sync half way to the head > of config. I updated Binutils (master and binutils-2_31-branch) and GCC (master) to use the latest versions of config.sub (2018-07-03) and config.guess (2018-06-26).
diff --git a/config.guess b/config.guess index 883a6713bf0..445c406836e 100755 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-05-19' +timestamp='2018-06-26' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -894,8 +894,8 @@ EOF # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" diff --git a/config.sub b/config.sub index d1f5b549034..072700fb037 100755 --- a/config.sub +++ b/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-05-24' +timestamp='2018-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1125,6 +1125,12 @@ case $basic_machine in ps2) basic_machine=i386-ibm ;; + riscv) + basic_machine=riscv32-unknown + ;; + riscv-*) + basic_machine=`echo "$basic_machine" | sed 's/^riscv/riscv32/'` + ;; rm[46]00) basic_machine=mips-siemens ;;