]> git.pld-linux.org Git - packages/klibc.git/blame - klibc-klcc.patch
- rediffed klcc patch
[packages/klibc.git] / klibc-klcc.patch
CommitLineData
107ae0b7
JB
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))' >> $@
21525a49 5 $(Q)echo 'BITSIZE=$(KLIBCBITSIZE)' >> $@
0e46d0ce 6 $(Q)echo 'VERSION=$(shell cat $(srctree)/usr/klibc/version)' >> $@
21525a49
AM
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
dcb240be
JB
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
5b98d45c
PS
20@@ -3,22 +3,22 @@
21 use IPC::Open3;
c860c3d8
PS
22
23 # Standard includes
7daab090 24-@includes = ("-I${prefix}/${KCROSS}include/arch/${ARCHDIR}",
c860c3d8
PS
25- "-I${prefix}/${KCROSS}include/bits${BITSIZE}",
26- "-I${prefix}/${KCROSS}include");
a153fd38
JB
27+@includes = ("-idirafter", "${includedir}/arch/${ARCH}",
28+ "-idirafter", "${includedir}/bits${BITSIZE}",
29+ "-idirafter", "${includedir}");
c860c3d8
PS
30
31 # Default optimization options (for compiles without -g)
32 @optopt = @OPTFLAGS;
7eb616bb
PS
33 @goptopt = ('-O');
34
35 # Standard library directories
36-@stdlibpath = ("-L${prefix}/${KCROSS}lib");
37+@stdlibpath = ("-L${libdir}");
c860c3d8
PS
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");
dcb240be 42-@sharedopt = (@EMAIN, map { "${prefix}/${KCROSS}lib/$_" } @CRTSHARED);
c860c3d8 43-@sharedlib = ('-R', "${prefix}/${KCROSS}lib/libc.so");
7eb616bb
PS
44+@staticopt = ("${libdir}/klibc/crt0.o");
45+@staticlib = ("${libdir}/klibc/libc.a");
dcb240be 46+@sharedopt = (@EMAIN, map { "${libdir}/klibc/$_" } @CRTSHARED);
7eb616bb 47+@sharedlib = ('-R', "${libdir}/klibc/libc.so");
c860c3d8
PS
48
49 # Returns the language (-x option string) for a specific extension.
50 sub filename2lang($) {
5b98d45c
PS
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?
7daab090 60@@ -186,6 +186,7 @@
7eb616bb
PS
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;
21525a49
AM
68diff -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.066674 seconds and 4 git commands to generate.