--- klibc-1.0/klcc/klcc.in.orig 2005-03-07 22:44:49.000000000 +0100 +++ klibc-1.0/klcc/klcc.in 2005-06-13 21:05:09.000000000 +0200 @@ -3,22 +3,22 @@ use IPC::Open3; # Standard includes -@includes = ("-I${prefix}/${KCROSS}include/arch/${ARCH}", - "-I${prefix}/${KCROSS}include/bits${BITSIZE}", - "-I${prefix}/${KCROSS}include"); +@includes = ("-I${includedir}/arch/${ARCH}", + "-I${includedir}/bits${BITSIZE}", + "-I${includedir}"); # Default optimization options (for compiles without -g) @optopt = @OPTFLAGS; @goptopt = ('-O'); # Standard library directories -@stdlibpath = ("-L${prefix}/${KCROSS}lib"); +@stdlibpath = ("-L${libdir}"); # Options and libraries to pass to ld; shared versus static -@staticopt = ("${prefix}/${KCROSS}lib/crt0.o"); -@staticlib = ("${prefix}/${KCROSS}lib/libc.a"); -@sharedopt = (@EMAIN, "${prefix}/${KCROSS}lib/interp.o"); -@sharedlib = ('-R', "${prefix}/${KCROSS}lib/libc.so"); +@staticopt = ("${libdir}/klibc/crt0.o"); +@staticlib = ("${libdir}/klibc/libc.a"); +@sharedopt = (@EMAIN, "${libdir}/klibc/interp.o"); +@sharedlib = ('-R', "${libdir}/klibc/libc.so"); # Returns the language (-x option string) for a specific extension. sub filename2lang($) { @@ -113,7 +113,7 @@ $save_temps = 0; # The -save-temps option $verbose = 0; # The -v option -$shared = 0; # Are we compiling shared? +$shared = 1; # Are we compiling shared? $debugging = 0; # -g or -p option present? $strip = 0; # -s option present? undef $output; # -o option present? @@ -175,6 +175,7 @@ } elsif ( $a eq '-shared' ) { $shared = 1; } elsif ( $a eq '-static' ) { + push(@ldopt, $a); $shared = 0; } elsif ( $a eq '-s' ) { $strip = 1;