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)' >> $@
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
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}");
31 # Default optimization options (for compiles without -g)
35 # Standard library directories
36 -@stdlibpath = ("-L${prefix}/${KCROSS}lib");
37 +@stdlibpath = ("-L${libdir}");
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");
49 # Returns the language (-x option string) for a specific extension.
50 sub filename2lang($) {
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?
61 } elsif ( $a eq '-shared' ) {
63 } elsif ( $a eq '-static' ) {
66 } elsif ( $a eq '-s' ) {
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
74 # Location for installation
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
87 # Create a fake .config as present in the kernel tree