package/jitterentropy-library: fix build failure due to missing -fPIC
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
jitterentropy-library needs -fPIC flag to build so add it when building.
Fixes:
http://autobuild.buildroot.net/results/505/5059207ec9ab0b502717626cc84956dafd0c3c32/
--- package/jitterentropy-library/jitterentropy-library.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
package/jitterentropy-library/jitterentropy-library.mk +4 -1
@@ -10,8 +10,11 @@ JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause JITTERENTROPY_LIBRARY_LICENSE_FILES = COPYING COPYING.bsd COPYING.gplv2 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES +JITTERENTROPY_LIBRARY_CFLAGS = $(TARGET_CFLAGS) +JITTERENTROPY_LIBRARY_CFLAGS += -fPIC + define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)" endef define JITTERENTROPY_LIBRARY_INSTALL_STAGING_CMDS
Signature · 1 line
2.20.1
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Quoted 15 lines · Giulio Benetti
jitterentropy-library needs -fPIC flag to build so add it when building.
Fixes:
http://autobuild.buildroot.net/results/505/5059207ec9ab0b502717626cc84956dafd0c3c32/Signed-off-by Giulio Benetti <[email protected]>--- package/jitterentropy-library/jitterentropy-library.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)package/jitterentropy-library/jitterentropy-library.mk +0
-0
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 14
Quoted 5 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-0@@ -10,8 +10,11 @@ JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause JITTERENTROPY_LIBRARY_LICENSE_FILES = COPYING COPYING.bsd COPYING.gplv2 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES +JITTERENTROPY_LIBRARY_CFLAGS = $(TARGET_CFLAGS) +JITTERENTROPY_LIBRARY_CFLAGS += -fPIC
This is not good. Options like fPIC should be added by the package build system
itself.
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 17
Quoted 4 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-1+ define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)"
And here we see the actual issue: TARGET_CONFIGURE_OPTS should be passed in the
environment instead of as arguments, so the Makefile can add its stuff to it.
Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...
Also, I notice now that it always builds both a static and a shared library,
even on BR2_STATIC_LIBS. That will probably trigger a different build failure...
Matt?
Regards,
Arnout
Quoted 4 lines
package/jitterentropy-library/jitterentropy-library.mk +0
-0endef define JITTERENTROPY_LIBRARY_INSTALL_STAGING_CMDS
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Quoted 22 lines · Arnout Vandecappelle
Quoted 18 lines · Giulio Benetti
jitterentropy-library needs -fPIC flag to build so add it when building.
Fixes:
http://autobuild.buildroot.net/results/505/5059207ec9ab0b502717626cc84956dafd0c3c32/Signed-off-by Giulio Benetti <[email protected]>--- package/jitterentropy-library/jitterentropy-library.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)package/jitterentropy-library/jitterentropy-library.mk +0
-0@@ -10,8 +10,11 @@ JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause JITTERENTROPY_LIBRARY_LICENSE_FILES = COPYING COPYING.bsd COPYING.gplv2 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES
Quoted 5 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 14
Quoted 2 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-0+JITTERENTROPY_LIBRARY_CFLAGS = $(TARGET_CFLAGS) +JITTERENTROPY_LIBRARY_CFLAGS += -fPICThis is not good. Options like fPIC should be added by the package build system
itself.
Upstream was really receptive to other changes. Giulio, do you want to submit it? If not I can.
Quoted 9 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 17
Quoted 5 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-1+ define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)"And here we see the actual issue:
TARGET_CONFIGURE_OPTSshould be passed in the
environment instead of as arguments, so theMakefilecan add its stuff to it.
Quoted 7 lines
Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...Also, I notice now that it always builds both a static and a shared library,
even onBR2_STATIC_LIBS. That will probably trigger a different build failure...
I'll take a look at some other packages to see how we didi this. Right not upstream isn't setup to break the two apart.
Regards,
Matt
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Arnout,
Quoted 24 lines · Matthew Weber
Quoted 22 lines · Arnout Vandecappelle
Quoted 18 lines · Giulio Benetti
jitterentropy-library needs -fPIC flag to build so add it when building.
Fixes:
http://autobuild.buildroot.net/results/505/5059207ec9ab0b502717626cc84956dafd0c3c32/Signed-off-by Giulio Benetti <[email protected]>--- package/jitterentropy-library/jitterentropy-library.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)package/jitterentropy-library/jitterentropy-library.mk +0
-0@@ -10,8 +10,11 @@ JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause JITTERENTROPY_LIBRARY_LICENSE_FILES = COPYING COPYING.bsd COPYING.gplv2 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES
Quoted 8 lines
Quoted 5 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 14
Quoted 2 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-0+JITTERENTROPY_LIBRARY_CFLAGS = $(TARGET_CFLAGS) +JITTERENTROPY_LIBRARY_CFLAGS += -fPICThis is not good. Options like fPIC should be added by the package build system
itself.Upstream was really receptive to other changes. Giulio, do you want to submit it? If not I can.
Oops looking close are this it looks like what Arnout mentioned about moving the TARGET_CONFIGURE_OPTS to be part of the env. Guessing that will create some other failures with overlapping hardening and ssp flags but then the intent of the O0 and fPIC come through.
Quoted 14 lines
Quoted 14 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 17
Quoted 6 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-1+ define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)"And here we see the actual issue:
TARGET_CONFIGURE_OPTSshould be passed in the
environment instead of as arguments, so theMakefilecan add its stuff to it.Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...
Quoted 7 lines
Quoted 3 lines
Also, I notice now that it always builds both a static and a shared library,
even onBR2_STATIC_LIBS. That will probably trigger a different build failure...I'll take a look at some other packages to see how we didi this. Right not upstream isn't setup to break the two apart.
It doesn't look like the current upstream pkg Makefile is installing the static library beyond creating it in the local build folder. As rng-tools solely uses it as shared, do you think I can just go with adding "depends on !BR2_STATIC_LIBS" to the jitter-entropy-library Config.in? It looks like in rng-tools the jitter support is just disabled when it can't find the library so in the static case it shouldn't break the build. I'd just need to also add a conditional on the jitter-entropy-library dependency in rng-tools based on BR2_STATIC_LIBS.
Regards,
Matt
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Arnout, Giulio,
Quoted 35 lines · Matthew Weber
Arnout,
Quoted 30 lines · Matthew Weber
Quoted 27 lines · Arnout Vandecappelle
Quoted 15 lines · Giulio Benetti
jitterentropy-library needs -fPIC flag to build so add it when building.
Fixes:
http://autobuild.buildroot.net/results/505/5059207ec9ab0b502717626cc84956dafd0c3c32/Signed-off-by Giulio Benetti <[email protected]>--- package/jitterentropy-library/jitterentropy-library.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)package/jitterentropy-library/jitterentropy-library.mk +0
-0package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 14
Quoted 5 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-0@@ -10,8 +10,11 @@ JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause JITTERENTROPY_LIBRARY_LICENSE_FILES = COPYING COPYING.bsd COPYING.gplv2 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES +JITTERENTROPY_LIBRARY_CFLAGS = $(TARGET_CFLAGS) +JITTERENTROPY_LIBRARY_CFLAGS += -fPICThis is not good. Options like fPIC should be added by the package build system
itself.
Quoted 7 lines
Quoted 2 lines
Upstream was really receptive to other changes. Giulio, do you want to submit it? If not I can.
Oops looking close are this it looks like what Arnout mentioned about moving the
TARGET_CONFIGURE_OPTSto be part of the env. Guessing that will create some other failures with overlapping hardening and ssp flags but then the intent of the O0 and fPIC come through.
This snippet works to resolve the failure.
3 --- a/package/jitterentropy-library/jitterentropy-library.mk 4 +++ b/package/jitterentropy-library/jitterentropy-library.mk 5 @@ -11,7 +11,7 @@ JITTERENTROPY_LIBRARY_LICENSE_FILES =
COPYING COPYING.bsd COPYING.gplv2
6 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES
7
8 define JITTERENTROPY_LIBRARY_BUILD_CMDS
9 - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
10 + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
11 endefQuoted 23 lines
Quoted 15 lines
Quoted 15 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 17
Quoted 7 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-1+ define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)"And here we see the actual issue:
TARGET_CONFIGURE_OPTSshould be passed in the
environment instead of as arguments, so theMakefilecan add its stuff to it.Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...Quoted 7 lines
Quoted 3 lines
Also, I notice now that it always builds both a static and a shared library,
even onBR2_STATIC_LIBS. That will probably trigger a different build failure...I'll take a look at some other packages to see how we didi this. Right not upstream isn't setup to break the two apart.
Quoted 10 lines
It doesn't look like the current upstream pkg
Makefileis installing the static library beyond creating it in the local build folder. As rng-tools solely uses it as shared, do you think I can just go with adding "depends on !BR2_STATIC_LIBS" to the jitter-entropy-library Config.in? It looks like in rng-tools the jitter support is just disabled when it can't find the library so in the static case it shouldn't break the build. I'd just need to also add a conditional on the jitter-entropy-library dependency in rng-tools based onBR2_STATIC_LIBS.
Something like this?
https://pastebin.com/aeWL40Yr
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Arnout, Giulio,
Quoted 54 lines · Matthew Weber
Arnout, Giulio,
Quoted 35 lines · Matthew Weber
Arnout,
Quoted 30 lines · Matthew Weber
Quoted 27 lines · Arnout Vandecappelle
Quoted 15 lines · Giulio Benetti
jitterentropy-library needs -fPIC flag to build so add it when building.
Fixes:
http://autobuild.buildroot.net/results/505/5059207ec9ab0b502717626cc84956dafd0c3c32/Signed-off-by Giulio Benetti <[email protected]>--- package/jitterentropy-library/jitterentropy-library.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)package/jitterentropy-library/jitterentropy-library.mk +0
-0package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 14
Quoted 5 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-0@@ -10,8 +10,11 @@ JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause JITTERENTROPY_LIBRARY_LICENSE_FILES = COPYING COPYING.bsd COPYING.gplv2 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES +JITTERENTROPY_LIBRARY_CFLAGS = $(TARGET_CFLAGS) +JITTERENTROPY_LIBRARY_CFLAGS += -fPICThis is not good. Options like fPIC should be added by the package build system
itself.Quoted 7 lines
Quoted 2 lines
Upstream was really receptive to other changes. Giulio, do you want to submit it? If not I can.
Oops looking close are this it looks like what Arnout mentioned about moving the
TARGET_CONFIGURE_OPTSto be part of the env. Guessing that will create some other failures with overlapping hardening and ssp flags but then the intent of the O0 and fPIC come through.This snippet works to resolve the failure.
3 ---
a/package/jitterentropy-library/jitterentropy-library.mk4 +++b/package/jitterentropy-library/jitterentropy-library.mk5 @@ -11,7 +11,7 @@JITTERENTROPY_LIBRARY_LICENSE_FILES=
COPYING COPYING.bsd COPYING.gplv2
Quoted 7 lines
6 JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES
7
8 define JITTERENTROPY_LIBRARY_BUILD_CMDS
9 - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
10 + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
11 endefI've sent a v2 of this one proposing the reordering for now.
http://patchwork.ozlabs.org/patch/1183895/
Quoted 34 lines
Quoted 23 lines
Quoted 15 lines
Quoted 15 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 17
Quoted 7 lines
package/jitterentropy-library/jitterentropy-library.mk +2
-1+ define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)"And here we see the actual issue:
TARGET_CONFIGURE_OPTSshould be passed in the
environment instead of as arguments, so theMakefilecan add its stuff to it.Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...Quoted 7 lines
Quoted 3 lines
Also, I notice now that it always builds both a static and a shared library,
even onBR2_STATIC_LIBS. That will probably trigger a different build failure...I'll take a look at some other packages to see how we didi this. Right not upstream isn't setup to break the two apart.
Quoted 10 lines
It doesn't look like the current upstream pkg
Makefileis installing the static library beyond creating it in the local build folder. As rng-tools solely uses it as shared, do you think I can just go with adding "depends on !BR2_STATIC_LIBS" to the jitter-entropy-library Config.in? It looks like in rng-tools the jitter support is just disabled when it can't find the library so in the static case it shouldn't break the build. I'd just need to also add a conditional on the jitter-entropy-library dependency in rng-tools based onBR2_STATIC_LIBS.
Quoted 2 lines
Something like this?
https://pastebin.com/aeWL40Yr
Ignore, +Fabrice Fontaine handled this in
http://patchwork.ozlabs.org/project/buildroot/list/?series=138439
Regards,
Matt
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
In reply to Arnout VandecappelleQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Hi,
Quoted 11 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 17
Quoted 4 lines
+
defineJITTERENTROPY_LIBRARY_BUILD_CMDSpackage/jitterentropy-library/jitterentropy-library.mk +1
-1- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)"And here we see the actual issue:
TARGET_CONFIGURE_OPTSshould be passed in the
environment instead of as arguments, so theMakefilecan add its stuff to it.Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...
The fstack-protector-* options should be handled by BR2_SSP_* and hardcoded in the package. Why would we want to use -O0?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Quoted 12 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Hi,
Quoted 7 lines
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause · line 17
Quoted 4 lines
+
defineJITTERENTROPY_LIBRARY_BUILD_CMDSpackage/jitterentropy-library/jitterentropy-library.mk +1
-1- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(JITTERENTROPY_LIBRARY_CFLAGS)"And here we see the actual issue:
TARGET_CONFIGURE_OPTSshould be passed in the
environment instead of as arguments, so theMakefilecan add its stuff to it.
Quoted 6 lines
Quoted 3 lines
Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...The fstack-protector-* options should be handled by BR2_SSP_* and hardcoded in the package.
If with "hardcoded in the package" you mean "set by the package's .mk file",
then I disagree, since it is passed by the toolchain wrapper.
Quoted 1 line
Why would we want to use -O0?
The package description is "Hardware RNG based on CPU timing jitter." I expect
that compiler optimisations mess with CPU timing jitter.
Regards,
Arnout
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Hi,
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...The fstack-protector-* options should be handled by BR2_SSP_* and hardcoded in the package.
If with "hardcoded in the package" you mean "set by the package's .mk file",
then I disagree, since it is passed by the toolchain wrapper.
Sorry, there was a NOT missing, E.G. NOT hardcoded in .mk.
Quoted 4 lines
Quoted 1 line
Why would we want to use -O0?
The package description is "Hardware RNG based on CPU timing jitter." I expect
that compiler optimisations mess with CPU timing jitter.
Ah yes, possibly.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Quoted 8 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Hi,
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Hm, but maybe there are indeed good reasons to override the CFLAGS, because the
fstack-protector-all requires support from the toolchain. On the other hand, we probably *do* want to keep the -O0 and -fwrapv flags...
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
The fstack-protector-* options should be handled by BR2_SSP_* and hardcoded in the package.
If with "hardcoded in the package" you mean "set by the package's .mk file",
then I disagree, since it is passed by the toolchain wrapper.Sorry, there was a NOT missing, E.G. NOT hardcoded in .mk.
Yes, that's what I meant to say: CFLAGS should be overridden because we *don't*
want the Makefile's stack-protector option, because the toolchain may not support it.
Regards,
Arnout
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Why would we want to use -O0?
The package description is "Hardware RNG based on CPU timing jitter." I expect
that compiler optimisations mess with CPU timing jitter.Ah yes, possibly.
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
FWIW, we are now getting build errors in jitterentropy-library. The "fPIC" commit seems to be to blame. Specifically, the backslash that was removed.
If I put the backslash back, it works again:
$ git diff
(quoted diff) +0 -0
b/package/jitterentropy-library/jitterentropy-library.mk index 75c770f..3db04b2 100644
package/jitterentropy-library/jitterentropy-library.mk +1 -1
@@ -22,7 +22,7 @@ JITTERENTROPY_LIBRARY_INSTALL_TARGETS += install-shared endif define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ $(JITTERENTROPY_LIBRARY_BUILD_TARGETS) endef
This is the error without the above change:
Quoted 1 line
Quoted 1 line
Quoted 1 line
jitterentropy-library 2.2.0 Building
PATH="/local/users/mmayer/buildroot/output/arm64/host/bin:/local/users/mmayer/buildroot/output/arm64/host/sbin:/home/mm940762/bin:/home/mm940762/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PATH="/local/users/mmayer/buildroot/output/arm64/host/bin:/local/users/mmayer/buildroot/output/arm64/host/sbin:/home/mm940762/bin:/home/mm940762/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" AR="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ar"
AS="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-as"
LD="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ld"
NM="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-nm"
CC="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gcc"
GCC="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gcc"
CPP="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-cpp"
CXX="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-g++"
FC="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gfortran"
F77="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gfortran"
RANLIB="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ranlib"
READELF="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-readelf"
STRIP="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-strip"
OBJCOPY="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-objcopy"
OBJDUMP="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-objdump"
AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as"
CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc"
CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld"
CPPFLAGS_FOR_BUILD="-I/local/users/mmayer/buildroot/output/arm64/host/include
-DNDEBUG" CFLAGS_FOR_BUILD="-O2
-I/local/users/mmayer/buildroot/output/arm64/host/include -DNDEBUG"
CXXFLAGS_FOR_BUILD="-O2
-I/local/users/mmayer/buildroot/output/arm64/host/include -DNDEBUG"
LDFLAGS_FOR_BUILD="-L/local/users/mmayer/buildroot/output/arm64/host/lib
-Wl,-rpath,/local/users/mmayer/buildroot/output/arm64/host/lib"
FCFLAGS_FOR_BUILD=""
DEFAULT_ASSEMBLER="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-as"
DEFAULT_LINKER="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ld"
CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os "
CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -Os " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os
" PKG_CONFIG="/local/users/mmayer/buildroot/output/arm64/host/bin/pkg-config"
STAGING_DIR="/local/users/mmayer/buildroot/output/arm64/host/aarch64-buildroot-linux-gnu/sysroot"
INTLTOOL_PERL=/usr/local/bin/perl ROOTDIR=../.. LINUXDIR=linux-stb-4.9
PKG_CONFIG="/local/users/mmayer/buildroot/output/arm64/host/bin/pkg-config"/usr/bin/make -j33 -C
/local/users/mmayer/buildroot/output/arm64/build/jitterentropy-library-2.2.0
/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gcc
-shared -Wl,-soname,libjitterentropy.so.2 -o libjitterentropy.so.2.2.0
jitterentropy-base.o -Wl,-z,relro,-z,now -lrt
/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ar
rcs libjitterentropy.a jitterentropy-base.o
jitterentropy/bin/bash: jitterentropy: command not foundpackage/pkg-generic.mk:238: recipe for target
'/local/users/mmayer/buildroot/output/arm64/build/jitterentropy-library-2.2.0/.stamp_built'
failed
make[1]: *** [/local/users/mmayer/buildroot/output/arm64/build/jitterentropy-library-2.2.0/.stamp_built]
Error 127
Makefile:25: recipe for target '_all' failed
make: *** [_all] Error 2
Regards,
-Markus
PATCH 1/1 package/jitterentropy-library: fix build failure due to missing -fPIC
Quoted 7 lines · Markus Mayer
$ git diffpackage/jitterentropy-library/jitterentropy-library.mk +0
-0
package/jitterentropy-library/jitterentropy-library.mk JITTERENTROPY_LIBRARY_INSTALL_TARGETS += install-shared · line 27
Quoted 7 lines
package/jitterentropy-library/jitterentropy-library.mk +1
-1@@ -22,7 +22,7 @@ JITTERENTROPY_LIBRARY_INSTALL_TARGETS += install-shared endif define JITTERENTROPY_LIBRARY_BUILD_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ $(JITTERENTROPY_LIBRARY_BUILD_TARGETS) endef
I submitted a proper patch for this.
http://lists.busybox.net/pipermail/buildroot/2019-October/263865.html
Regards,
-Markus
Quoted 61 lines
This is the error without the above change:
Quoted 1 line
Quoted 1 line
Quoted 1 line
jitterentropy-library 2.2.0 Building
PATH="/local/users/mmayer/buildroot/output/arm64/host/bin:/local/users/mmayer/buildroot/output/arm64/host/sbin:/home/mm940762/bin:/home/mm940762/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PATH="/local/users/mmayer/buildroot/output/arm64/host/bin:/local/users/mmayer/buildroot/output/arm64/host/sbin:/home/mm940762/bin:/home/mm940762/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" AR="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ar"
AS="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-as"
LD="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ld"
NM="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-nm"
CC="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gcc"
GCC="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gcc"
CPP="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-cpp"
CXX="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-g++"
FC="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gfortran"
F77="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gfortran"
RANLIB="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ranlib"
READELF="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-readelf"
STRIP="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-strip"
OBJCOPY="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-objcopy"
OBJDUMP="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-objdump"
AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as"
CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc"
CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld"
CPPFLAGS_FOR_BUILD="-I/local/users/mmayer/buildroot/output/arm64/host/includepackage/jitterentropy-library/jitterentropy-library.mk +0
-2-DNDEBUG" CFLAGS_FOR_BUILD="-O2 -I/local/users/mmayer/buildroot/output/arm64/host/include -DNDEBUG"CXXFLAGS_FOR_BUILD="-O2 -I/local/users/mmayer/buildroot/output/arm64/host/include -DNDEBUG" LDFLAGS_FOR_BUILD="-L/local/users/mmayer/buildroot/output/arm64/host/lib -Wl,-rpath,/local/users/mmayer/buildroot/output/arm64/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-as" DEFAULT_LINKER="/local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
package/jitterentropy-library/jitterentropy-library.mk +0
-2-D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os "CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -Os " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os
" PKG_CONFIG="/local/users/mmayer/buildroot/output/arm64/host/bin/pkg-config" STAGING_DIR="/local/users/mmayer/buildroot/output/arm64/host/aarch64-buildroot-linux-gnu/sysroot" INTLTOOL_PERL=/usr/local/bin/perl ROOTDIR=../.. LINUXDIR=linux-stb-4.9 PKG_CONFIG="/local/users/mmayer/buildroot/output/arm64/host/bin/pkg-config"/usr/bin/make-j33 -C /local/users/mmayer/buildroot/output/arm64/build/jitterentropy-library-2.2.0 /local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-gcc
-shared -Wl,-soname,libjitterentropy.so.2 -o libjitterentropy.so.2.2.0 jitterentropy-base.o -Wl,-z,relro,-z,now -lrt /local/users/mmayer/buildroot/output/arm64/host/bin/aarch64-linux-ar
rcs libjitterentropy.a jitterentropy-base.o
jitterentropy/bin/bash: jitterentropy: command not foundpackage/pkg-generic.mk:238: recipe for target '/local/users/mmayer/buildroot/output/arm64/build/jitterentropy-library-2.2.0/.stamp_built' failed
make[1]: *** [/local/users/mmayer/buildroot/output/arm64/build/jitterentropy-library-2.2.0/.stamp_built] Error 127
Makefile:25: recipe for target '_all' failed
make: *** [_all] Error 2Regards,
-Markus