This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cant get autoconf/automake to crosscompile




Daniel Kegel wrote:
I cant get my ./configure to use the arm-linux-gcc (and so on), it keeps using the gcc whatever I try to do.

Traditionally, one does this in one of two ways: a) ./configure --target arm-linux (which causes CC to default to arm-linux-gcc, I think) b) CC=arm-linux-gcc ./configure (which sets CC directly)

This I do/have tried, but it still picks the gcc and not the arm-linux-gcc.


the intent is to make things portable, so the builder can always
pick a different CC or target.

Thats my intention, or at least I will run on both Linux PC and embedded Linux.


I understand that './configure --host arm-linux' should do the trick, but I cant get this to work on any other things than the example following the development kit. But the configure file is 144kb so I dont feel like going thru that file.

When I make my own Makefile manually it works ok (see below).
So something must be wrong with the way I build my configure file, or somthing is wrong on my system so ./configure ignore the
--host arm-linux (which is a bit strange since it works on the example file)


I've tried to change the path and make links e.g. gcc = arm-linux-gcc, so that when somthing asks for gcc it gets the arm-linux-gcc, this work to some extent, but also gives a lot of problems, and it's NOT the way to do things proper.

Will be happy for any info/tips/help. Been searching the net and reading documentatin for weeks, but dosnt seem to get any further by my own.

Using WinCE and pay some $$ to Bill is starting to sound like a way out :) ugh did I say that?

Regards
Robert Staven

-------------------------------------------------------
# Set target prefix for tool chain e.g. arm-linux-gcc
TARGET = arm-linux-
#TARGET =

# Tool names
CC          = $(TARGET)gcc
export CC

# Build settings
CFLAGS      = `$(TARGET)pkg-config gtk+-2.0 --cflags`
LDFLAGS     = `$(TARGET)pkg-config gtk+-2.0 --libs`

# Installation variables
EXEC_NAME = hello

# Files needed for the build
OBJS        = hello.o

# Make rules
all: hello

.c.o: $(CC) $(CFLAGS) -c $<

hello:	$(OBJS)
	$(CC) -o $(EXEC_NAME) $(OBJS) $(LDFLAGS)
	$(TARGET)strip $(EXEC_NAME)

clean:
	rm -f *.o $(EXEC_NAME) core

distclean:
	rm -f *~
	rm -f *.o $(EXEC_NAME) core


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]