1 diff -urN klibc-1.1.16.org/klcc/Kbuild klibc-1.1.16/klcc/Kbuild
2 --- klibc-1.1.16.org/klcc/Kbuild 2006-01-06 07:11:43.000000000 +0100
3 +++ klibc-1.1.16/klcc/Kbuild 2006-01-06 19:31:36.327836000 +0100
5 $(Q)echo 'EMAIN=$(KLIBCEMAIN)' >> $@
6 $(Q)echo 'BITSIZE=$(KLIBCBITSIZE)' >> $@
7 $(Q)echo 'VERSION=$(shell cat $(srctree)/usr/klibc/version)' >> $@
8 - $(Q)echo 'prefix=$(INSTALLDIR)' >> $@
9 - $(Q)echo 'bindir=$(INSTALLDIR)/$(KCROSS)bin' >> $@
10 - $(Q)echo 'libdir=$(INSTALLDIR)/$(KCROSS)lib' >> $@
11 - $(Q)echo 'includedir=$(INSTALLDIR)/$(KCROSS)include' >> $@
12 + $(Q)echo 'prefix=$(rpm_prefix)' >> $@
13 + $(Q)echo 'bindir=$(rpm_bindir)' >> $@
14 + $(Q)echo 'libdir=$(rpm_libdir)' >> $@
15 + $(Q)echo 'includedir=$(rpm_includedir)' >> $@
19 --- klibc-2.0/klcc/klcc.in.orig 2012-05-29 23:41:34.000000000 +0200
20 +++ klibc-2.0/klcc/klcc.in 2012-06-15 21:25:24.514959356 +0200
25 -@includes = ("-I${prefix}/${KCROSS}include/arch/${ARCHDIR}",
26 - "-I${prefix}/${KCROSS}include/bits${BITSIZE}",
27 - "-I${prefix}/${KCROSS}include");
28 +@includes = ("-idirafter", "${includedir}/arch/${ARCH}",
29 + "-idirafter", "${includedir}/bits${BITSIZE}",
30 + "-idirafter", "${includedir}");
32 # Default optimization options (for compiles without -g)
36 # Standard library directories
37 -@stdlibpath = ("-L${prefix}/${KCROSS}lib");
38 +@stdlibpath = ("-L${libdir}");
40 # Options and libraries to pass to ld; shared versus static
41 -@staticopt = ("${prefix}/${KCROSS}lib/crt0.o");
42 -@staticlib = ("${prefix}/${KCROSS}lib/libc.a");
43 -@sharedopt = (@EMAIN, "${prefix}/${KCROSS}lib/interp.o");
44 -@sharedlib = ('-R', "${prefix}/${KCROSS}lib/libc.so");
45 +@staticopt = ("${libdir}/klibc/crt0.o");
46 +@staticlib = ("${libdir}/klibc/libc.a");
47 +@sharedopt = (@EMAIN, "${libdir}/klibc/interp.o");
48 +@sharedlib = ('-R', "${libdir}/klibc/libc.so");
50 # Returns the language (-x option string) for a specific extension.
51 sub filename2lang($) {
54 $save_temps = 0; # The -save-temps option
55 $verbose = 0; # The -v option
56 -$shared = 0; # Are we compiling shared?
57 +$shared = 1; # Are we compiling shared?
58 $debugging = 0; # -g or -p option present?
59 $strip = 0; # -s option present?
60 undef $output; # -o option present?
62 } elsif ( $a eq '-shared' ) {
64 } elsif ( $a eq '-static' ) {
67 } elsif ( $a eq '-s' ) {
69 diff -urN klibc-1.1.16.org/Makefile klibc-1.1.16/Makefile
70 --- klibc-1.1.16.org/Makefile 2006-01-06 07:11:43.000000000 +0100
71 +++ klibc-1.1.16/Makefile 2006-01-06 19:32:24.054818750 +0100
75 # Location for installation
77 -export bindir = $(prefix)/bin
78 -export libdir = $(prefix)/lib
79 -export mandir = $(prefix)/man
80 -export INSTALLDIR = $(prefix)/lib/klibc
81 +export prefix = $(rpm_prefix)
82 +export bindir = $(rpm_bindir)
83 +export libdir = $(rpm_libdir)
84 +export mandir = $(rpm_mandir)
85 +export INSTALLDIR = $(rpm_libdir)/klibc
88 # Create a fake .config as present in the kernel tree