[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cross compiling build tools with EXEEXT
From: |
Theo Markettos |
Subject: |
Cross compiling build tools with EXEEXT |
Date: |
Mon, 1 Dec 2008 12:32:12 +0000 |
User-agent: |
Mutt/1.5.9i |
I'm trying to run an existing autoconf/automake setup in a cross compiler.
The cross compiler script generally Does The Right Thing about setting up
--build, --host etc etc.
The Makefile.am has the line:
noinst_PROGRAMS = bf_test
where bf_test is a program run on the build system to generate some files
used by other parts of the build.
So far I've modified the Makefile.am to build bf_test using $(CC_FOR_BUILD)
and some special make rules:
bf_test_SOURCES = file1.c file2.c file3.c
bf_test: $(bf_test_SOURCES)
$(CC_FOR_BUILD) -o bf_test $(bf_test_SOURCES)
That's fine, only the cross compiler needs to put an extension ,e1f on
executables for the host system. $(EXEEXT) is set up for this, and normally
it works fine.
The problem is that automake thus thinks that the noinst_PROGRAMS are for
the host system, and so generates rules which depend on bf_test,e1f. Which
doesn't exist and so it fails. I can't fudge this rule to get the naming
right because this name is being inferred by automake, not taken from my
Makefile.am
(I suppose I /could/ build bf_test for both build and host systems as it's
quite simple, but this isn't nice and doesn't work if it's not buildable for
the host system. I could equally just 'touch bf_test,e1f' but that's still
a hack).
Is there some way of saying "I want the following built for the build system
not the host system, so build them according to the native rules" - which
would use CC_FOR_BUILD, EXEEXT_FOR_BUILD, etc? Maybe a list of targets
called something like noinst_BUILD_PROGRAMS?
Thanks
Theo
- Cross compiling build tools with EXEEXT,
Theo Markettos <=