Skip to contentSkip to conversation

arch: allow passing compile flags (branch yem/arc-atomic)

PATCH Superseded Yann E. MORIN 2 participants 5 messages Jul 14, 2019 – Jul 16, 2019

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 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 v1 -> v2;
- move condition that was previously in package/Makefile.in (Alexey)

Regards,
Yann E. MORIN.

The following changes since commit fb9c86a31c7933d2a320644be9cfff4be71a3206

package/imx-uuc: bump to version fc48b497fe961d601b4bcced807f562090854ec9 (2019-07-14 15:59:56 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to 8d0887d8b7c56dd2b92314886f35bdaa7d57894d

arch/arc: always needs -matomic with atomix extensions (2019-07-14 16:28:43 +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.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/2 toolchain: allow architectures to enforce compilation flags

Cc Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
---
 toolchain/toolchain-wrapper.mk | 1 +
 1 file changed, 1 insertion(+)
toolchain/toolchain-wrapper.mk +1 -0
index ca66fa7ba4..8f872506ec 100644
@@ -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
#2 lore raw

PATCH v2 2/2 arch/arc: always needs -matomic with atomix extensions

In reply to Yann E. MORIN

As reported by Alexey:

    https://patchwork.ozlabs.org/patch/1087480/
    https://patchwork.ozlabs.org/patch/1087471/
Cc Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

---
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
new file mode 100644
index 0000000000..559216a733
@@ -0,0 +1,4 @@
+# -matomic is always required when the ARC core has the atomic extensions
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),y)
+ARCH_TOOLCHAIN_WRAPPER_OPTS = -matomic
+endif
package/Makefile.in +0 -4
index f05b9cc3aa..0a7899c852 100644
@@ -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
#3 lore raw

PATCH v2 2/2 arch/arc: always needs -matomic with atomix extensions

All,

On 2019-07-14 16:29 +0200, Yann E. MORIN spake thusly:

Quoted 25 lines

As reported by Alexey:

    https://patchwork.ozlabs.org/patch/1087480/
    https://patchwork.ozlabs.org/patch/1087471/
Cc Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

---
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 +0 -0
new file mode 100644
index 0000000000..559216a733

arch/arch.mk.arc line 2

Quoted 2 lines
arch/arch.mk.arc new file +2 -0
@@ -0,0 +1,4 @@
+# -matomic is always required when the ARC core has the atomic extensions
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),y)

Damned, I forgot to git-commit-amend... :-( It should be 'yy' rather than a single ...

Regards,
Yann E. MORIN.

Quoted 20 lines
arch/arch.mk.arc new file +2 -0
+ARCH_TOOLCHAIN_WRAPPER_OPTS = -matomic
+endif
package/Makefile.in +0 -4
index f05b9cc3aa..0a7899c852 100644
@@ -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
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.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

v2 cover arch: allow passing compile flags (branch yem/arc-atomic)

In reply to Yann E. MORIN

Hi Yann, all,

Quoted 9 lines

-----Original Message-----
From: Yann E. MORIN <[email protected]> On Behalf Of Yann E. MORIN
Sent: Sunday, July 14, 2019 5:30 PM
To: buildroot at buildroot.org
Cc: Alexey Brodkin <[email protected]>; Alexey Brodkin <[email protected]>; Arnout Vandecappelle <[email protected]>; Thomas Petazzoni <[email protected]>; Yann E . MORIN <[email protected]>
Subject: [PATCH 0/2 v2] arch: allow passing compile flags (branch yem/arc-atomic)

Quoted 4 lines

Hello All!

This series makes it so that architectures can set compilation flags, passed down via the wrapper.

Works like a charm now for building Linux perf for ARC770 (finally)! Thanks for doing that!

That said for entire series...