Using different as for port

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.
 
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.
Code:
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
 
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.

Code:
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
 
Back
Top