* [Buildroot] [PATCH 1/1] package/glm: fix musl build
@ 2017-06-12 18:29 Bernd Kuhls
2017-06-12 19:27 ` Thomas Petazzoni
2017-06-21 5:46 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2017-06-12 18:29 UTC (permalink / raw)
To: buildroot
The musl-related build error occurs because -pedantic is used for gcc
which is broken with musl, for details refer to
https://git.buildroot.net/buildroot/commit/package/jsoncpp?id=6b462ac8bd4021dda4f84198a127f1be7b46087d
Glm uses this option only if GLM_TEST_ENABLE_LANG_EXTENSIONS=OFF, to
solve the problem we set it to ON in order to use another code path
in CMakeLists.txt which causes no other changes to compiler options
because GLM_TEST_ENABLE_FAST_MATH defaults to OFF.
To sum up, this patch only prevents -pedantic being added to gcc
options which fixes
http://autobuild.buildroot.net/results/890/8900d0c45c859edd95bb3610b224b9f222ef7493/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/glm/glm.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/glm/glm.mk b/package/glm/glm.mk
index 1f23146dd..96947afea 100644
--- a/package/glm/glm.mk
+++ b/package/glm/glm.mk
@@ -14,4 +14,6 @@ GLM_LICENSE_FILES = copying.txt
GLM_INSTALL_STAGING = YES
GLM_INSTALL_TARGET = NO
+GLM_CONF_OPTS = -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON
+
$(eval $(cmake-package))
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/glm: fix musl build
2017-06-12 18:29 [Buildroot] [PATCH 1/1] package/glm: fix musl build Bernd Kuhls
@ 2017-06-12 19:27 ` Thomas Petazzoni
2017-06-21 5:46 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-06-12 19:27 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 12 Jun 2017 20:29:36 +0200, Bernd Kuhls wrote:
> The musl-related build error occurs because -pedantic is used for gcc
> which is broken with musl, for details refer to
> https://git.buildroot.net/buildroot/commit/package/jsoncpp?id=6b462ac8bd4021dda4f84198a127f1be7b46087d
>
> Glm uses this option only if GLM_TEST_ENABLE_LANG_EXTENSIONS=OFF, to
> solve the problem we set it to ON in order to use another code path
> in CMakeLists.txt which causes no other changes to compiler options
> because GLM_TEST_ENABLE_FAST_MATH defaults to OFF.
>
> To sum up, this patch only prevents -pedantic being added to gcc
> options which fixes
> http://autobuild.buildroot.net/results/890/8900d0c45c859edd95bb3610b224b9f222ef7493/
While I agree this works, it looks very, very fragile and clunky.
Shouldn't we patch out the -pedantic instead?
It's much more explicit and less likely to break.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/glm: fix musl build
2017-06-12 18:29 [Buildroot] [PATCH 1/1] package/glm: fix musl build Bernd Kuhls
2017-06-12 19:27 ` Thomas Petazzoni
@ 2017-06-21 5:46 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-06-21 5:46 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 12 Jun 2017 20:29:36 +0200, Bernd Kuhls wrote:
> The musl-related build error occurs because -pedantic is used for gcc
> which is broken with musl, for details refer to
> https://git.buildroot.net/buildroot/commit/package/jsoncpp?id=6b462ac8bd4021dda4f84198a127f1be7b46087d
>
> Glm uses this option only if GLM_TEST_ENABLE_LANG_EXTENSIONS=OFF, to
> solve the problem we set it to ON in order to use another code path
> in CMakeLists.txt which causes no other changes to compiler options
> because GLM_TEST_ENABLE_FAST_MATH defaults to OFF.
>
> To sum up, this patch only prevents -pedantic being added to gcc
> options which fixes
> http://autobuild.buildroot.net/results/890/8900d0c45c859edd95bb3610b224b9f222ef7493/
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
The problem fixed by this patch no longer exists with the latest
rebuild of the musl toolchains, which use gcc 6.x over gcc 5.x.
However, I haven't been able to identify which commit in gcc is fixing
this. Could you investigate this a little bit?
Also, I would prefer a patch to the package that removes -pedantic
rather than the fragile solution you proposed.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-21 5:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 18:29 [Buildroot] [PATCH 1/1] package/glm: fix musl build Bernd Kuhls
2017-06-12 19:27 ` Thomas Petazzoni
2017-06-21 5:46 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.