arch: allow passing compile flags (branch yem/arc-atomic)
v3 cover arch: allow passing compile flags (branch yem/arc-atomic)
Hello All!
This series makes it so that architectures can set compilation flags, passed down via the wrapper.
This is then used by arc to enforce -matomic for those cores that need it, namely arc7x0, as reported by Alexey:
https://patchwork.ozlabs.org/patch/1087480/ https://patchwork.ozlabs.org/patch/1087471/
Changes v2 -> v3:
- fix 'y' -> 'yy' in condition
Changes v1 -> v2:
- move condition that was previously in package/Makefile.in (Alexey)
Regards,
Yann E. MORIN.
The following changes since commit ed3eef6bb49270de619e5a86a249fdd8724c40cd
package/glib-networking: bump to version 2.61.1 (2019-07-14 16:11:45 +0200)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 7fe54408b9c04d8d5799a167aded7c0b0157c572
arch/arc: always needs -matomic with atomix extensions (2019-07-18 22:51:24 +0200)
----------------------------------------------------------------
Yann E. MORIN (2):
toolchain: allow architectures to enforce compilation flags arch/arc: always needs -matomic with atomix extensions
arch/arch.mk.arc | 4 ++++ package/Makefile.in | 4 ---- toolchain/toolchain-wrapper.mk | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 arch/arch.mk.arc
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/2 toolchain: allow architectures to enforce compilation flags
--- toolchain/toolchain-wrapper.mk | 1 + 1 file changed, 1 insertion(+)
toolchain/toolchain-wrapper.mk +1 -0
@@ -17,6 +17,7 @@ TOOLCHAIN_WRAPPER_ARGS = $($(PKG)_TOOLCHAIN_WRAPPER_ARGS) TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"' TOOLCHAIN_WRAPPER_OPTS = \ + $(ARCH_TOOLCHAIN_WRAPPER_OPTS) \ $(call qstrip,$(BR2_SSP_OPTION)) \ $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
Signature · 1 line
2.20.1
PATCH v3 2/2 arch/arc: always needs -matomic with atomix extensions
In reply to Yann E. MORINAs reported by Alexey:
https://patchwork.ozlabs.org/patch/1087480/ https://patchwork.ozlabs.org/patch/1087471/
---
Changes v2 -> v3:
- fix the condition test ('yy', not 'y')
Changes v1 -> v2:
- move the condition out of package/Makefile.in (Alexey)
--- arch/arch.mk.arc | 4 ++++ package/Makefile.in | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 arch/arch.mk.arc
arch/arch.mk.arc new file +4 -0
@@ -0,0 +1,4 @@ +# -matomic is always required when the ARC core has the atomic extensions +ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy) +ARCH_TOOLCHAIN_WRAPPER_OPTS = -matomic +endif
package/Makefile.in +0 -4
@@ -112,10 +112,6 @@ ifeq ($(BR2_xtensa),y) TARGET_ABI += -mlongcalls -mauto-litpools endif -ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy) -TARGET_ABI += -matomic -endif - STAGING_SUBDIR = $(GNU_TARGET_NAME)/sysroot STAGING_DIR = $(HOST_DIR)/$(STAGING_SUBDIR)
Signature · 1 line
2.20.1
v3 cover arch: allow passing compile flags (branch yem/arc-atomic)
In reply to Yann E. MORINHello,
Quoted 3 lines · On Thu, 18 Jul 2019 22:52:46 +0200 "Yann E. MORIN" <[email protected]>…
Yann E. MORIN (2):
toolchain: allow architectures to enforce compilation flagsarch/arc: always needs -matomic with atomix extensions
Thanks, I've applied the series. I extended the commit log of the second patch, because it was really terse.
Following this, I believe it would make sense to move the two remaining uses of TARGET_ABI in package/Makefile.in to the appropriate arch/ file, and drop TARGET_ABI entirely. Indeed, those ABI options are really mandatory, if they don't get passed to the cross-compiler, things are going to be clearly wrong.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v3 cover arch: allow passing compile flags (branch yem/arc-atomic)
Quoted 7 lines · On Thu, 18 Jul 2019 22:57:40 +0200 Thomas Petazzoni…
Quoted 3 lines · On Thu, 18 Jul 2019 22:52:46 +0200 "Yann E. MORIN" <[email protected]>…
Yann E. MORIN (2):
toolchain: allow architectures to enforce compilation flagsarch/arc: always needs -matomic with atomix extensions
Quoted 8 lines
Thanks, I've applied the series. I extended the commit log of the second patch, because it was really terse.
Following this, I believe it would make sense to move the two remaining uses of
TARGET_ABIin package/Makefile.in to the appropriatearch/file, and dropTARGET_ABIentirely. Indeed, those ABI options are really mandatory, if they don't get passed to the cross-compiler, things are going to be clearly wrong.
Also, in relation to this, I think we could probably revert commit 18855d79e2e86dc646182bd6f4861c491a05c624 one the TARGET_ABI flags are encoded into the compiler wrapper.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com