PDA

View Full Version : [Solved] Using different as for port


nekoexmachina
February 28th, 2010, 12:44
Hello, forums!
as pf http://www.freebsd.org/doc/en/articles/custom-gcc/article.html , i can use different CC's for different ports.
What is about gnu/as?
I want to create a port for newer mplayer with mt support - and it does not compile with system's as, just with newest binutils-2009. Ive tried to grep binutils from Makefiles in ports dir - there were some ports that needed recent binutils, i've tried to read them - but did not understand how does as substitution work.

sahne
February 28th, 2010, 14:42
hi,

have you tried passing the correct flags to mplayers configure script ?

if quickly had a look at i and maybe passing --as=/path/to/gnu-as will do the job

add something like this to your Makefile and test it.

BUILD_DEPENDS += /path/to/ports-ac:${PORTSDIS}/devel/binutils
BUILD_DEPENDS += /path/to/ports-gcc:${PORTSDIS}/lang/gcc44

CONFIGURE_ARGS+= --as=/path/to/ports-as
CONFIGURE_ARGS+= --cc=/path/to/ports-gcc

sahne
February 28th, 2010, 15:01
sorry, the above code didn't work in a quick test but you can patch mplayers config.mak file after the configure run
all you have to do is replacing the CC, AS, etc. vars in config.mak.


post-configure:
sed -i .new 's/AS=.*$/AS=\/path\/to\/as' {WRKSRC}/config.mak && mv ${WRKSRC}/config.mak.new ${WRKSRC}/config.mak


I hope this one finally will fix your problem

nekoexmachina
March 1st, 2010, 19:12
Yeah, thanks alot, that helped.