Thomas Schwinge <tschwi...@baylibre.com> writes: > Hi Sam and Tom!
Hi! > > On 2024-12-06T09:13:40+0000, Sam James <s...@gentoo.org> wrote: >> Providing parameters to `.` when sourcing is a bashism and not supported >> by POSIX shell which causes a build failure when compiling a toolchain >> for nvptx-none with dash as /bin/sh. > > Hmm, something must be wrong in that statement, as I'm regularly building > GCC/nvptx on a system with '/bin/sh -> dash'. Hmmmm. Do you per chance override CONFIG_SHELL (or SHELL)? Or does configure, for some reason, determine that SHELL on your system is bash? Note that at least on Debian, I believe dash is built without lineno support, so configure will disqualify it as a shell for some purposes (the story behind that is a bit odd but whatever). > >> gen-copyright.sh takes a parameter for the format of copyright notice >> required. Switch that to using an environment variable `NVPTX_GEN_COPYRIGHT`, >> although this could be changed to a function if desired (just more churn >> in gen-copyright.sh then). >> >> gcc/ChangeLog: >> PR target/117854 >> >> * config/nvptx/gen-copyright.sh: Read NVPTX_GEN_COPYRIGHT envvar. >> * config/nvptx/gen-h.sh: Set NVPTX_GEN_COPYRIGHT. >> * config/nvptx/gen-opt.sh: Ditto. >> --- >> Testing it now with a build for nvptx-none. Is this approach OK or >> would you prefer the function approach (which will make the diff larger >> because of reformatting)? > > First: Tom, what was your original intention why we'd keep the generated > files in the sources? (..., instead of just generating them at build > time, like 'gcc/config/nvptx/t-omp-device' does for > 'omp-device-properties-nvptx', for example. In that case, we could just > skip adding these copyright/licensing headers.) > > Second: why not just invoke 'gen-copyright.sh' instead of sourcing it? I had wondered about the latter as well. > > > Grüße > Thomas thanks, sam > [...]