diff options
| author | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-05 10:47:32 +0200 |
|---|---|---|
| committer | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-05 11:16:12 +0200 |
| commit | 31ca000d72bc48060f205d94bfffc25ffe5fd18d (patch) | |
| tree | c020a188a8db2fe34a728c27d12cc143627f5378 /configure | |
| parent | cb2138f8b098feb1b51a407343a4b99e25d5b506 (diff) | |
| download | tinycc-31ca000d72bc48060f205d94bfffc25ffe5fd18d.tar.gz tinycc-31ca000d72bc48060f205d94bfffc25ffe5fd18d.tar.bz2 | |
Add multiarch dirs to linker search path
By default, tcc search libraries in /lib and /usr/local/lib while crt*.o
files are searched in /usr/lib and ld.so is searched in /lib.
Unfortunetely the path are hardcoded in source code. This patch allow
tcc to look in an other directory and also to look in extra directories.
It's then possible to make tcc search libraries in /lib/x86_64-linux-gnu
and /usr/local/lib/x86_64-linux-gnu while crt*.o files are searched in
/usr/lib/x86_64-linux-gnu and ld.so is searched in
/lib/x86_64-linux-gnu.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 42 |
1 files changed, 27 insertions, 15 deletions
@@ -26,6 +26,8 @@ prefix="" execprefix="" bindir="" libdir="" +lddir="" +extralddir="" tccdir="" includedir="" mandir="" @@ -108,6 +110,10 @@ for opt do ;; --libdir=*) libdir=`echo $opt | cut -d '=' -f 2` ;; + --lddir=*) lddir=`echo $opt | cut -d '=' -f 2` + ;; + --extralddir=*) extralddir="$extralddir:`echo $opt | cut -d '=' -f 2`" + ;; --includedir=*) includedir=`echo $opt | cut -d '=' -f 2` ;; --sharedir=*) sharedir=`echo $opt | cut -d '=' -f 2` @@ -241,6 +247,8 @@ echo " --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX echo " [same as prefix]" echo " --bindir=DIR user executables in DIR [EPREFIX/bin]" echo " --libdir=DIR object code libraries in DIR [EPREFIX/lib]" +echo " --lddir=DIR loader library search path in DIR [/lib]" +echo " --extralddir=DIR extra loader library search path in DIR []" echo " --tccdir=DIR installation directory [EPREFIX/lib/tcc]" echo " --includedir=DIR C header files in DIR [PREFIX/include]" echo " --sharedir=DIR documentation root DIR [PREFIX]/share" @@ -322,21 +330,23 @@ if test x"$includedir" = x""; then includedir="${prefix}/include" fi -echo "Binary directory $bindir" -echo "TinyCC directory $tccdir" -echo "Library directory $libdir" -echo "Include directory $includedir" -echo "Manual directory $mandir" -echo "Info directory $infodir" -echo "Doc directory $docdir" -echo "Target root prefix $sysroot" -echo "Source path $source_path" -echo "C compiler $cc" -echo "CPU $cpu" -echo "Big Endian $bigendian" -echo "gprof enabled $gprof" -echo "cross compilers $build_cross" -echo "use libgcc $use_libgcc" +echo "Binary directory $bindir" +echo "TinyCC directory $tccdir" +echo "Library directory $libdir" +echo "Loader library search directory ${lddir:-default value (see tcc.h)}" +echo "Extra loader library search directory ${extralddir:-(none)}" +echo "Include directory $includedir" +echo "Manual directory $mandir" +echo "Info directory $infodir" +echo "Doc directory $docdir" +echo "Target root prefix $sysroot" +echo "Source path $source_path" +echo "C compiler $cc" +echo "CPU $cpu" +echo "Big Endian $bigendian" +echo "gprof enabled $gprof" +echo "cross compilers $build_cross" +echo "use libgcc $use_libgcc" echo "Creating config.mak and config.h" @@ -356,6 +366,8 @@ echo "docdir=\$(DESTDIR)$docdir" >> config.mak echo "#define CONFIG_SYSROOT \"$sysroot\"" >> $TMPH echo "#ifndef CONFIG_TCCDIR" >> $TMPH echo "#define CONFIG_TCCDIR \"$tccdir\"" >> $TMPH +echo "#define CONFIG_TCC_LDDIR \"$lddir\"" >> $TMPH +echo "#define CONFIG_TCC_EXTRA_LDDIR \"$extralddir\"" >> $TMPH echo "#endif" >> $TMPH echo "CC=$cc" >> config.mak echo "GCC_MAJOR=$gcc_major" >> config.mak |
