* [PATCH 2/2] ar9170-fw: Use self-built toolchain by default
@ 2009-06-06 17:13 Jan Kiszka
2009-06-06 17:59 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2009-06-06 17:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: Luis R. Rodriguez, otus-devel, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index e0113d6..5fc0868 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# Type is AP or STA
TYPE ?= STA
-PFX ?= /usr/share/gnush_v0901_elf-1/bin/sh-elf-
+PFX ?= $(shell pwd)/toolchain/inst/bin/sh-elf-
CC = $(PFX)gcc
LD = $(PFX)ld
AS = $(PFX)as
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ar9170-fw: Use self-built toolchain by default
2009-06-06 17:13 [PATCH 2/2] ar9170-fw: Use self-built toolchain by default Jan Kiszka
@ 2009-06-06 17:59 ` Johannes Berg
2009-06-06 18:32 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-06-06 17:59 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Luis R. Rodriguez, otus-devel, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
On Sat, 2009-06-06 at 19:13 +0200, Jan Kiszka wrote:
> Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
> ---
>
> Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e0113d6..5fc0868 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,7 +1,7 @@
> # Type is AP or STA
> TYPE ?= STA
>
> -PFX ?= /usr/share/gnush_v0901_elf-1/bin/sh-elf-
> +PFX ?= $(shell pwd)/toolchain/inst/bin/sh-elf-
This will fail in strange ways if the user doesn't first manually build
the toolchain... It does that if you don't have it installed, but it
would be nice to tell them to build it?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ar9170-fw: Use self-built toolchain by default
2009-06-06 17:59 ` Johannes Berg
@ 2009-06-06 18:32 ` Jan Kiszka
2009-06-06 18:47 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2009-06-06 18:32 UTC (permalink / raw)
To: Johannes Berg; +Cc: Luis R. Rodriguez, otus-devel, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]
Johannes Berg wrote:
> On Sat, 2009-06-06 at 19:13 +0200, Jan Kiszka wrote:
>> Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
>> ---
>>
>> Makefile | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index e0113d6..5fc0868 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,7 +1,7 @@
>> # Type is AP or STA
>> TYPE ?= STA
>>
>> -PFX ?= /usr/share/gnush_v0901_elf-1/bin/sh-elf-
>> +PFX ?= $(shell pwd)/toolchain/inst/bin/sh-elf-
>
> This will fail in strange ways if the user doesn't first manually build
> the toolchain... It does that if you don't have it installed, but it
> would be nice to tell them to build it?
>
What about this? There are probably smarter ways to achieve this, but
I'm not speaking fluently 'make'.
---------->
Switch the default to our own toolchain and provide a hint in case it's
missing or the provided PFX does not point to a gcc.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
Makefile | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index e0113d6..6316f62 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,13 @@
# Type is AP or STA
TYPE ?= STA
-PFX ?= /usr/share/gnush_v0901_elf-1/bin/sh-elf-
-CC = $(PFX)gcc
-LD = $(PFX)ld
-AS = $(PFX)as
-OBJCOPY = $(PFX)objcopy
+PFX ?= $(shell pwd)/toolchain/inst/bin/sh-elf-
+VALID_PFX = $(if $(wildcard $(PFX)gcc), $(PFX), \
+ $(error Error: sh2 gcc not found. To build your own, invoke 'make -C toolchain'.))
+CC = $(VALID_PFX)gcc
+LD = $(VALID_PFX)ld
+AS = $(VALID_PFX)as
+OBJCOPY = $(VALID_PFX)objcopy
# CPU is a Little endian sh2a-nofpu-or-sh3-nommu
CPU = -m2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ar9170-fw: Use self-built toolchain by default
2009-06-06 18:32 ` Jan Kiszka
@ 2009-06-06 18:47 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-06-06 18:47 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Luis R. Rodriguez, otus-devel, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
On Sat, 2009-06-06 at 20:32 +0200, Jan Kiszka wrote:
> What about this? There are probably smarter ways to achieve this, but
> I'm not speaking fluently 'make'.
Seems fine, thanks. I'll test both your patches and then merge them.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-06 18:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-06 17:13 [PATCH 2/2] ar9170-fw: Use self-built toolchain by default Jan Kiszka
2009-06-06 17:59 ` Johannes Berg
2009-06-06 18:32 ` Jan Kiszka
2009-06-06 18:47 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).