Can't find specified CC

Dmitry Samersoff dmitry.samersoff at oracle.com
Thu Nov 19 14:34:54 UTC 2015


Frider,

I use command below to cross-compile JDK:

_cross_prefix="aarch64-unknown-linux-gnu"

  configure_params="${configure_params} \
--openjdk-target=${_cross_prefix}"

export CC=${_cross_prefix}-gcc
export CXX=${_cross_prefix}-g++
export LD=${_cross_prefix}-ld
export OBJCOPY=${_cross_prefix}-objcopy
export STRIP=${_cross_prefix}-strip

eval sh ./configure ${configure_params}

-Dmitry

On 2015-11-19 16:13, Frieder Berthold wrote:
> Hello to all,
> 
> I want to build the openJDK with a musl cross-compiler.
> For that reason I configure the project with CC=/absolut/path/to/my/compiler
> Configure then says that it can't find a working C Compiler.
> Using strace on the configure command I can see that it tries to open the
> specified path appended to some default paths (e.g
> /usr/local/sbin//absolut/path/to/my/compiler or
> /usr/bin//absolut/path/to/my/compiler)
> My solution right now is a symlink to my compiler in one of those paths,
> but this doesn't feel right.
> Is there a more correct way of doing it?
> 
> Frieder
> 


-- 
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.



More information about the build-dev mailing list