Hi! On Fri, 31 May 2013 21:54:55 +0200, Eric Botcazou <ebotca...@adacore.com> wrote: > > In my reading, the code supported both these before your recent change, > > and now supports neither, as I reported this morning. > > Did you test it?
I didn't; now I have, and... > > With which configurations exactly have you tested your change? > > arm-linux-androideabi ..., you're right that this one works, but it only works by chance: targ:=$(subst -, ,$(subst -gnu, ,$(target_alias))) arch:=$(word 1,$(targ)) ifeq ($(words $(targ)),2) manu:= osys:=$(word 2,$(targ)) else manu:=$(word 2,$(targ)) osys:=$(word 3,$(targ)) endif default: @echo "target_alias = »$(target_alias)«" @echo "targ = »$(targ)«" @echo "arch = »$(arch)«" @echo "manu = »$(manu)«" @echo "osys = »$(osys)«" ifeq ($(strip $(filter-out arm% androideabi,$(arch) $(osys))),) @echo matched else @echo not matched endif We get: $ make target_alias=arm-linux-androideabi target_alias = »arm-linux-androideabi« targ = »arm linux androideabi« arch = »arm« manu = »linux« osys = »androideabi« matched So, your case works because the manu/osys parsing wrongly detects/assigns a manufacturer »linux« and an operating system androideabi. Then, the following case fails, which is expected to yield identical results, with "complete triplets" -- which I took for granted in my reasoning about the Makefile code: $ make target_alias=arm-unknown-linux-androideabi target_alias = »arm-unknown-linux-androideabi« targ = »arm unknown linux androideabi« arch = »arm« manu = »unknown« osys = »linux« not matched My suggested change would make all these work -- however I have not yet had the time to fully digest your other emails with the reasoning that you need configure GCC with non-canonical target and target_alias set differently. Grüße, Thomas
pgpJ37CEJQUlN.pgp
Description: PGP signature