Hi all,
As you probably know gprbuild is broken in Fedora'ARM. It happened because (for some reasons) koji uses --target=armv7hl-redhat-linux-gnu for gprbuild configuration but gprbuild expects armv7hl-redhat-linux-gnueabi ("gcc -dumpmachine"'s output). I sent email to @devel and @arm and response was like "Gcc and mock do wrong things but we use that we want for consistency" [1]. I'd not like to hardcore target somewhere or use dirty "sed tricks" to workaround that configuration.
So... I need help :( Any ideas/suggestions?
-- Pavel
[1] https://lists.fedoraproject.org/pipermail/devel/2014-June/200040.html
Pavel Zhukov wrote:
Hi all,
As you probably know gprbuild is broken in Fedora'ARM. It happened because (for some reasons) koji uses --target=armv7hl-redhat-linux-gnu for gprbuild configuration but gprbuild expects armv7hl-redhat-linux-gnueabi ("gcc -dumpmachine"'s output). I sent email to @devel and @arm and response was like "Gcc and mock do wrong things but we use that we want for consistency" [1]. I'd not like to hardcore target somewhere or use dirty "sed tricks" to workaround that configuration.
So... I need help :( Any ideas/suggestions?
I have very little time for Fedora work currently, but I would like to at least understand what the problem is. Could you answer some questions to help me understand the problem?
· Do you know if there's an important difference between "gnu" and "gnueabi", or if it's just two names for the same thing?
· I get the impression that GPRbuild has a default target compiled in, which it uses if --target isn't passed, and the value it uses for the default comes from the RPM macro "configure". Is that right?
· Do GPRbuild and GPRconfig use the target string only for comparing to the output of "gcc -dumpmachine", or is it also used for something else? Does GPRbuild for example pass parameters to GCC based on the target string that affect how GCC compiles code?
Björn
Hi Bjorn,
Quoting Björn Persson <bjorn@rombobjörn.se>:
Pavel Zhukov wrote:
Hi all,
As you probably know gprbuild is broken in Fedora'ARM. It happened because (for some reasons) koji uses --target=armv7hl-redhat-linux-gnu for gprbuild configuration but gprbuild expects armv7hl-redhat-linux-gnueabi ("gcc -dumpmachine"'s output). I sent email to @devel and @arm and response was like "Gcc and mock do wrong things but we use that we want for consistency" [1]. I'd not like to hardcore target somewhere or use dirty "sed tricks" to workaround that configuration.
So... I need help :( Any ideas/suggestions?
I have very little time for Fedora work currently, but I would like to at least understand what the problem is. Could you answer some questions to help me understand the problem?
· Do you know if there's an important difference between "gnu" and "gnueabi", or if it's just two names for the same thing?
As per answer from arm-guys is only two names for consistency. I have no idea that consistency they mean.
· I get the impression that GPRbuild has a default target compiled in, which it uses if --target isn't passed, and the value it uses for the default comes from the RPM macro "configure". Is that right?
You're right.
· Do GPRbuild and GPRconfig use the target string only for comparing to the output of "gcc -dumpmachine", or is it also used for something else? Does GPRbuild for example pass parameters to GCC based on the target string that affect how GCC compiles code?
as far as I understood it uses -dumpmachine to determinate the target and use compiller/linker options accordingly.
Björn
Pavel Zhukov wrote:
Quoting Björn Persson <bjorn@rombobjörn.se>:
· Do you know if there's an important difference between "gnu" and "gnueabi", or if it's just two names for the same thing?
As per answer from arm-guys is only two names for consistency. I have no idea that consistency they mean.
· I get the impression that GPRbuild has a default target compiled in, which it uses if --target isn't passed, and the value it uses for the default comes from the RPM macro "configure". Is that right?
You're right.
· Do GPRbuild and GPRconfig use the target string only for comparing to the output of "gcc -dumpmachine", or is it also used for something else? Does GPRbuild for example pass parameters to GCC based on the target string that affect how GCC compiles code?
as far as I understood it uses -dumpmachine to determinate the target and use compiller/linker options accordingly.
OK, but if "gnu" and "gnueabi" are synonymous, then the correct compiler and linker options should be the same for both. If we could get GPRbuild configured to look for a "gnueabi" compiler, would it then know to use the same options that it would use for "gnu"?
If so, then how about patching the makefile to run "gcc -dumpmachine" and compile that value into GPRbuild instead of what was passed to the configuration script? This wouldn't be acceptable upstream, but it should produce the desired result for Fedora. Koji doesn't cross-compile the packages, so the GCC that is present when GPRbuild is built will always be the same as the native GCC on installed systems.
It would also be interesting to know what happens if no --build or --host is passed to configure. It may cause correct defaults to be used, but I can also imagine that it might break building i386 packages on x86-64 build servers.
If GPRbuild doesn't know what compiler and linker options to use for "gnueabi", then perhaps GPRconfig could be patched to accept "gnueabi" as a synonym for "gnu"?
Björn