]> git.pld-linux.org Git - packages/klibc.git/blob - klibc-klcc.patch
- build shared binaries by default.
[packages/klibc.git] / klibc-klcc.patch
1 --- klibc-1.0/klcc.in.orig      2005-03-07 22:44:49.000000000 +0100
2 +++ klibc-1.0/klcc.in   2005-06-13 21:05:09.000000000 +0200
3 @@ -3,22 +3,22 @@
4  use IPC::Open3;
5  
6  # Standard includes
7 -@includes = ("-I${prefix}/${KCROSS}include/arch/${ARCH}",
8 -            "-I${prefix}/${KCROSS}include/bits${BITSIZE}",
9 -            "-I${prefix}/${KCROSS}include");
10 +@includes = ("-I${includedir}/arch/${ARCH}",
11 +            "-I${includedir}/bits${BITSIZE}",
12 +            "-I${includedir}");
13  
14  # Default optimization options (for compiles without -g)
15  @optopt =  @OPTFLAGS;
16  @goptopt = ('-O');
17  
18  # Standard library directories
19 -@stdlibpath = ("-L${prefix}/${KCROSS}lib");
20 +@stdlibpath = ("-L${libdir}");
21  
22  # Options and libraries to pass to ld; shared versus static
23 -@staticopt = ("${prefix}/${KCROSS}lib/crt0.o");
24 -@staticlib = ("${prefix}/${KCROSS}lib/libc.a");
25 -@sharedopt = (@EMAIN, "${prefix}/${KCROSS}lib/interp.o");
26 -@sharedlib = ('-R', "${prefix}/${KCROSS}lib/libc.so");
27 +@staticopt = ("${libdir}/klibc/crt0.o");
28 +@staticlib = ("${libdir}/klibc/libc.a");
29 +@sharedopt = (@EMAIN, "${libdir}/klibc/interp.o");
30 +@sharedlib = ('-R', "${libdir}/klibc/libc.so");
31  
32  # Returns the language (-x option string) for a specific extension.
33  sub filename2lang($) {
34 @@ -113,7 +113,7 @@
35  
36  $save_temps = 0;               # The -save-temps option
37  $verbose = 0;                  # The -v option
38 -$shared = 0;                   # Are we compiling shared?
39 +$shared = 1;                   # Are we compiling shared?
40  $debugging = 0;                        # -g or -p option present?
41  $strip = 0;                    # -s option present?
42  undef $output;                 # -o option present?
43 @@ -175,6 +175,7 @@
44      } elsif ( $a eq '-shared' ) {
45         $shared = 1;
46      } elsif ( $a eq '-static' ) {
47 +       push(@ldopt, $a);
48         $shared = 0;
49      } elsif ( $a eq '-s' ) {
50         $strip = 1;
51 --- klibc-1.0/Makefile.orig     2005-03-07 19:17:15.000000000 +0100
52 +++ klibc-1.0/Makefile  2005-06-13 20:57:41.000000000 +0200
53 @@ -27,10 +27,10 @@
54         echo 'STRIPFLAGS=$(STRIPFLAGS)' >> $@
55         echo 'EMAIN=$(EMAIN)' >> $@
56         echo 'BITSIZE=$(BITSIZE)' >> $@
57 -       echo 'prefix=$(INSTALLDIR)' >> $@
58 -       echo 'bindir=$(INSTALLDIR)/$(KCROSS)bin' >> $@
59 -       echo 'libdir=$(INSTALLDIR)/$(KCROSS)lib' >> $@
60 -       echo 'includedir=$(INSTALLDIR)/$(KCROSS)include' >> $@
61 +       echo 'prefix=$(prefix)' >> $@
62 +       echo 'bindir=$(bindir)' >> $@
63 +       echo 'libdir=$(libdir)' >> $@
64 +       echo 'includedir=$(includedir)' >> $@
65  
66  $(CROSS)klcc: klcc.in $(CROSS)klibc.config makeklcc.pl
67         $(PERL) makeklcc.pl klcc.in $(CROSS)klibc.config \
This page took 0.076807 seconds and 3 git commands to generate.