]> git.pld-linux.org Git - packages/klibc.git/blob - klibc-klcc.patch
- rediffed klcc patch
[packages/klibc.git] / klibc-klcc.patch
1 --- klibc-2.0.9/klcc/Kbuild.orig        2021-05-09 17:11:57.600121311 +0200
2 +++ klibc-2.0.9/klcc/Kbuild     2021-05-09 17:12:54.373071231 +0200
3 @@ -24,10 +24,10 @@ $(obj)/$(KLIBCCROSS)klibc.config: $(src)
4         $(Q)echo 'CRTSHARED=$(notdir $(KLIBCCRTSHARED))' >> $@
5         $(Q)echo 'BITSIZE=$(KLIBCBITSIZE)' >> $@
6         $(Q)echo 'VERSION=$(shell cat $(srctree)/usr/klibc/version)' >> $@
7 -       $(Q)echo 'prefix=$(INSTALLDIR)' >> $@
8 -       $(Q)echo 'bindir=$(INSTALLDIR)/$(KCROSS)bin' >> $@
9 -       $(Q)echo 'libdir=$(INSTALLDIR)/$(KCROSS)lib' >> $@
10 -       $(Q)echo 'includedir=$(INSTALLDIR)/$(KCROSS)include' >> $@
11 +       $(Q)echo 'prefix=$(rpm_prefix)' >> $@
12 +       $(Q)echo 'bindir=$(rpm_bindir)' >> $@
13 +       $(Q)echo 'libdir=$(rpm_libdir)' >> $@
14 +       $(Q)echo 'includedir=$(rpm_includedir)' >> $@
15  
16  
17  # Generate klcc
18 --- klibc-2.0.9/klcc/klcc.in.orig       2021-04-29 16:03:19.000000000 +0200
19 +++ klibc-2.0.9/klcc/klcc.in    2021-05-08 18:55:05.039418288 +0200
20 @@ -3,22 +3,22 @@
21  use IPC::Open3;
22  
23  # Standard includes
24 -@includes = ("-I${prefix}/${KCROSS}include/arch/${ARCHDIR}",
25 -            "-I${prefix}/${KCROSS}include/bits${BITSIZE}",
26 -            "-I${prefix}/${KCROSS}include");
27 +@includes = ("-idirafter", "${includedir}/arch/${ARCH}",
28 +            "-idirafter", "${includedir}/bits${BITSIZE}",
29 +            "-idirafter", "${includedir}");
30  
31  # Default optimization options (for compiles without -g)
32  @optopt =  @OPTFLAGS;
33  @goptopt = ('-O');
34  
35  # Standard library directories
36 -@stdlibpath = ("-L${prefix}/${KCROSS}lib");
37 +@stdlibpath = ("-L${libdir}");
38  
39  # Options and libraries to pass to ld; shared versus static
40 -@staticopt = ("${prefix}/${KCROSS}lib/crt0.o");
41 -@staticlib = ("${prefix}/${KCROSS}lib/libc.a");
42 -@sharedopt = (@EMAIN, map { "${prefix}/${KCROSS}lib/$_" } @CRTSHARED);
43 -@sharedlib = ('-R', "${prefix}/${KCROSS}lib/libc.so");
44 +@staticopt = ("${libdir}/klibc/crt0.o");
45 +@staticlib = ("${libdir}/klibc/libc.a");
46 +@sharedopt = (@EMAIN, map { "${libdir}/klibc/$_" } @CRTSHARED);
47 +@sharedlib = ('-R', "${libdir}/klibc/libc.so");
48  
49  # Returns the language (-x option string) for a specific extension.
50  sub filename2lang($) {
51 @@ -113,7 +113,7 @@
52  
53  $save_temps = 0;               # The -save-temps option
54  $verbose = 0;                  # The -v option
55 -$shared = 0;                   # Are we compiling shared?
56 +$shared = 1;                   # Are we compiling shared?
57  $debugging = 0;                        # -g or -p option present?
58  $strip = 0;                    # -s option present?
59  undef $output;                 # -o option present?
60 @@ -186,6 +186,7 @@
61      } elsif ( $a eq '-shared' ) {
62         $shared = 1;
63      } elsif ( $a eq '-static' ) {
64 +       push(@ldopt, $a);
65         $shared = 0;
66      } elsif ( $a eq '-s' ) {
67         $strip = 1;
68 diff -urN klibc-1.1.16.org/Makefile klibc-1.1.16/Makefile
69 --- klibc-1.1.16.org/Makefile   2006-01-06 07:11:43.000000000 +0100
70 +++ klibc-1.1.16/Makefile       2006-01-06 19:32:24.054818750 +0100
71 @@ -21,11 +21,11 @@
72  export PERL       := perl
73  
74  # Location for installation
75 -export prefix      = /usr
76 -export bindir      = $(prefix)/bin
77 -export libdir      = $(prefix)/lib
78 -export mandir      = $(prefix)/man
79 -export INSTALLDIR  = $(prefix)/lib/klibc
80 +export prefix      = $(rpm_prefix)
81 +export bindir      = $(rpm_bindir)
82 +export libdir      = $(rpm_libdir)
83 +export mandir      = $(rpm_mandir)
84 +export INSTALLDIR  = $(rpm_libdir)/klibc
85  export INSTALLROOT =
86  
87  # Create a fake .config as present in the kernel tree
This page took 0.071482 seconds and 3 git commands to generate.