Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation
@ 2011-11-01  0:53 Stany MARCEL
  2011-11-01  0:53 ` [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper Stany MARCEL
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stany MARCEL @ 2011-11-01  0:53 UTC (permalink / raw)
  To: buildroot

When the external tools chain is installed in a path that match one of
the first case test, all symlink are created to the external
wrapper. The proposed solution is to test only the base name not the
full path.

Signed-off-by: Stany MARCEL <stanypub@gmail.com>
---
 toolchain/toolchain-external/ext-tool.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 8287916..572917f 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -318,9 +318,9 @@ $(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
 $(HOST_DIR)/usr/bin/ext-toolchain-wrapper: $(STAMP_DIR)/ext-toolchain-installed
 	mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \
 	for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
-		case "$$i" in \
+		base=$${i##*/}; \
+		case "$$base" in \
 		*cc|*cc-*|*++|*++-*|*cpp) \
-			base=$${i##*/}; \
 			ln -sf $(@F) $$base; \
 			;; \
 		*) \
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper
  2011-11-01  0:53 [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Stany MARCEL
@ 2011-11-01  0:53 ` Stany MARCEL
  2011-11-01 10:51   ` Yann E. MORIN
  2011-11-01 10:46 ` [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Yann E. MORIN
  2011-11-02 10:46 ` Peter Korsgaard
  2 siblings, 1 reply; 8+ messages in thread
From: Stany MARCEL @ 2011-11-01  0:53 UTC (permalink / raw)
  To: buildroot

Permit to define the mcpu of the external toolchain wrapper, based on
BR2_GCC_TARGET_CPU.

Signed-off-by: Stany MARCEL <stanypub@gmail.com>
---
 toolchain/toolchain-external/ext-tool.mk           |    6 ++++++
 .../toolchain-external/ext-toolchain-wrapper.c     |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 572917f..640db5e 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -129,6 +129,8 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = \
 CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
 CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
 CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))
+CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
+
 
 # march/mtune/floating point mode needs to be passed to the external toolchain
 # to select the right multilib variant
@@ -144,6 +146,10 @@ ifneq ($(CC_TARGET_ABI_),)
 TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
 TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
 endif
+ifneq ($(CC_TARGET_CPU_),)
+TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
+TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
+endif
 
 ifeq ($(BR2_SOFT_FLOAT),y)
 TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
index 3e23061..b1a4fcb 100644
--- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
+++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
@@ -31,6 +31,9 @@ static char *predef_args[] = {
 #ifdef BR_ABI
 	"-mabi=" BR_ABI,
 #endif
+#ifdef BR_CPU
+	"-mcpu=" BR_CPU,
+#endif
 #ifdef BR_SOFTFLOAT
 	"-msoft-float",
 #endif /* BR_SOFTFLOAT */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation
  2011-11-01  0:53 [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Stany MARCEL
  2011-11-01  0:53 ` [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper Stany MARCEL
@ 2011-11-01 10:46 ` Yann E. MORIN
  2011-11-02 10:46 ` Peter Korsgaard
  2 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2011-11-01 10:46 UTC (permalink / raw)
  To: buildroot

Stany, All,

On Tuesday 01 November 2011 01:53:38 Stany MARCEL wrote:
> When the external tools chain is installed in a path that match one of
> the first case test, all symlink are created to the external
> wrapper. The proposed solution is to test only the base name not the
> full path.
> 
> Signed-off-by: Stany MARCEL <stanypub@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

Peter, this should go in before the -rc, if possible.

> ---
>  toolchain/toolchain-external/ext-tool.mk |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
> index 8287916..572917f 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -318,9 +318,9 @@ $(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
>  $(HOST_DIR)/usr/bin/ext-toolchain-wrapper: $(STAMP_DIR)/ext-toolchain-installed
>  	mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \
>  	for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
> -		case "$$i" in \
> +		base=$${i##*/}; \
> +		case "$$base" in \
>  		*cc|*cc-*|*++|*++-*|*cpp) \
> -			base=$${i##*/}; \
>  			ln -sf $(@F) $$base; \
>  			;; \
>  		*) \
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper
  2011-11-01  0:53 ` [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper Stany MARCEL
@ 2011-11-01 10:51   ` Yann E. MORIN
  2011-11-01 12:19     ` [Buildroot] [PATCH 2/2 v2] " Stany MARCEL
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2011-11-01 10:51 UTC (permalink / raw)
  To: buildroot

Stany, All,

On Tuesday 01 November 2011 01:53:39 Stany MARCEL wrote:
> Permit to define the mcpu of the external toolchain wrapper, based on
> BR2_GCC_TARGET_CPU.
> 
> Signed-off-by: Stany MARCEL <stanypub@gmail.com>
> ---
>  toolchain/toolchain-external/ext-tool.mk           |    6 ++++++
>  .../toolchain-external/ext-toolchain-wrapper.c     |    3 +++
>  2 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
> index 572917f..640db5e 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -129,6 +129,8 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = \
>  CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
>  CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
>  CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))
> +CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
> +

Spurious empty line.

>  # march/mtune/floating point mode needs to be passed to the external toolchain
>  # to select the right multilib variant
> @@ -144,6 +146,10 @@ ifneq ($(CC_TARGET_ABI_),)
>  TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
>  TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
>  endif
> +ifneq ($(CC_TARGET_CPU_),)
> +TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
> +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
> +endif

Probably, you could try to stick the CPU setting near the ARCH and TUNE
settings (ie. just before ABI, just after TUNE).

>  ifeq ($(BR2_SOFT_FLOAT),y)
>  TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
> diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c
> b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> index 3e23061..b1a4fcb 100644
> --- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
> +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> @@ -31,6 +31,9 @@ static char *predef_args[] = {
>  #ifdef BR_ABI
>  	"-mabi=" BR_ABI,
>  #endif
> +#ifdef BR_CPU
> +	"-mcpu=" BR_CPU,
> +#endif

Ditto as above.

>  #ifdef BR_SOFTFLOAT
>  	"-msoft-float",
>  #endif /* BR_SOFTFLOAT */
> 

Otherwise, looks good to me:
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2 v2] toolchain: Add the possibility to have a mcpu option with wrapper
  2011-11-01 10:51   ` Yann E. MORIN
@ 2011-11-01 12:19     ` Stany MARCEL
  2011-11-01 15:35       ` Yann E. MORIN
  2011-11-02 10:48       ` Peter Korsgaard
  0 siblings, 2 replies; 8+ messages in thread
From: Stany MARCEL @ 2011-11-01 12:19 UTC (permalink / raw)
  To: buildroot

Permit to define the mcpu of the external toolchain wrapper, based on
BR2_GCC_TARGET_CPU.

Signed-off-by: Stany MARCEL <stanypub@gmail.com>
---

Changes for v2:
 * Spurious empty line removed
 * CPU setting positionned above ABI one

 toolchain/toolchain-external/ext-tool.mk           |    5 +++++
 .../toolchain-external/ext-toolchain-wrapper.c     |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 572917f..a52621c 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -127,6 +127,7 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = \
 	-DBR_SYSROOT='"$(STAGING_DIR)"'

 CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
+CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
 CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
 CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))

@@ -140,6 +141,10 @@ ifneq ($(CC_TARGET_ARCH_),)
 TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_)
 TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"'
 endif
+ifneq ($(CC_TARGET_CPU_),)
+TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
+TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
+endif
 ifneq ($(CC_TARGET_ABI_),)
 TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
 TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
index 3e23061..cc404f3 100644
--- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
+++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
@@ -28,6 +28,9 @@ static char *predef_args[] = {
 #ifdef BR_TUNE
 	"-mtune=" BR_TUNE,
 #endif /* BR_TUNE */
+#ifdef BR_CPU
+	"-mcpu=" BR_CPU,
+#endif
 #ifdef BR_ABI
 	"-mabi=" BR_ABI,
 #endif
--
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2 v2] toolchain: Add the possibility to have a mcpu option with wrapper
  2011-11-01 12:19     ` [Buildroot] [PATCH 2/2 v2] " Stany MARCEL
@ 2011-11-01 15:35       ` Yann E. MORIN
  2011-11-02 10:48       ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2011-11-01 15:35 UTC (permalink / raw)
  To: buildroot

Stany, All,

On Tuesday 01 November 2011 13:19:16 Stany MARCEL wrote:
> Permit to define the mcpu of the external toolchain wrapper, based on
> BR2_GCC_TARGET_CPU.
> 
> Signed-off-by: Stany MARCEL <stanypub@gmail.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

Peter, I think this should go in before -rc as well.

Regards,
Yann E. MORIN.

> ---
> 
> Changes for v2:
>  * Spurious empty line removed
>  * CPU setting positionned above ABI one
> 
>  toolchain/toolchain-external/ext-tool.mk           |    5 +++++
>  .../toolchain-external/ext-toolchain-wrapper.c     |    3 +++
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
> index 572917f..a52621c 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -127,6 +127,7 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = \
>  	-DBR_SYSROOT='"$(STAGING_DIR)"'
> 
>  CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
> +CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
>  CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
>  CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))
> 
> @@ -140,6 +141,10 @@ ifneq ($(CC_TARGET_ARCH_),)
>  TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_)
>  TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"'
>  endif
> +ifneq ($(CC_TARGET_CPU_),)
> +TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
> +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
> +endif
>  ifneq ($(CC_TARGET_ABI_),)
>  TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
>  TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
> diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> index 3e23061..cc404f3 100644
> --- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
> +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> @@ -28,6 +28,9 @@ static char *predef_args[] = {
>  #ifdef BR_TUNE
>  	"-mtune=" BR_TUNE,
>  #endif /* BR_TUNE */
> +#ifdef BR_CPU
> +	"-mcpu=" BR_CPU,
> +#endif
>  #ifdef BR_ABI
>  	"-mabi=" BR_ABI,
>  #endif
> --
> 1.7.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation
  2011-11-01  0:53 [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Stany MARCEL
  2011-11-01  0:53 ` [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper Stany MARCEL
  2011-11-01 10:46 ` [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Yann E. MORIN
@ 2011-11-02 10:46 ` Peter Korsgaard
  2 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2011-11-02 10:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Stany" == Stany MARCEL <stanypub@gmail.com> writes:

 Stany> When the external tools chain is installed in a path that match one of
 Stany> the first case test, all symlink are created to the external
 Stany> wrapper. The proposed solution is to test only the base name not the
 Stany> full path.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2 v2] toolchain: Add the possibility to have a mcpu option with wrapper
  2011-11-01 12:19     ` [Buildroot] [PATCH 2/2 v2] " Stany MARCEL
  2011-11-01 15:35       ` Yann E. MORIN
@ 2011-11-02 10:48       ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2011-11-02 10:48 UTC (permalink / raw)
  To: buildroot

>>>>> "Stany" == Stany MARCEL <stanypub@gmail.com> writes:

 Stany> Permit to define the mcpu of the external toolchain wrapper, based on
 Stany> BR2_GCC_TARGET_CPU.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-11-02 10:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01  0:53 [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Stany MARCEL
2011-11-01  0:53 ` [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper Stany MARCEL
2011-11-01 10:51   ` Yann E. MORIN
2011-11-01 12:19     ` [Buildroot] [PATCH 2/2 v2] " Stany MARCEL
2011-11-01 15:35       ` Yann E. MORIN
2011-11-02 10:48       ` Peter Korsgaard
2011-11-01 10:46 ` [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Yann E. MORIN
2011-11-02 10:46 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox