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 diff -urN klibc-1.1.16.org/klcc/klcc.in klibc-1.1.16/klcc/klcc.in
20 --- klibc-1.1.16.org/klcc/klcc.in 2006-01-06 07:11:43.000000000 +0100
21 +++ klibc-1.1.16/klcc/klcc.in 2006-01-06 19:22:31.481785250 +0100
26 -@includes = ("-I${prefix}/${KCROSS}include/arch/${ARCH}",
27 - "-I${prefix}/${KCROSS}include/bits${BITSIZE}",
28 - "-I${prefix}/${KCROSS}include");
29 +@includes = ("-I${includedir}/arch/${ARCH}",
30 + "-I${includedir}/bits${BITSIZE}",
33 # Default optimization options (for compiles without -g)
37 # Standard library directories
38 -@stdlibpath = ("-L${prefix}/${KCROSS}lib");
39 +@stdlibpath = ("-L${libdir}");
41 # Options and libraries to pass to ld; shared versus static
42 -@staticopt = ("${prefix}/${KCROSS}lib/crt0.o");
43 -@staticlib = ("${prefix}/${KCROSS}lib/libc.a");
44 -@sharedopt = (@EMAIN, "${prefix}/${KCROSS}lib/interp.o");
45 -@sharedlib = ('-R', "${prefix}/${KCROSS}lib/libc.so");
46 +@staticopt = ("${libdir}/klibc/crt0.o");
47 +@staticlib = ("${libdir}/klibc/libc.a");
48 +@sharedopt = (@EMAIN, "${libdir}/klibc/interp.o");
49 +@sharedlib = ('-R', "${libdir}/klibc/libc.so");
51 # Returns the language (-x option string) for a specific extension.
52 sub filename2lang($) {
55 $save_temps = 0; # The -save-temps option
56 $verbose = 0; # The -v option
57 -$shared = 0; # Are we compiling shared?
58 +$shared = 1; # Are we compiling shared?
59 $debugging = 0; # -g or -p option present?
60 $strip = 0; # -s option present?
61 undef $output; # -o option present?
63 } elsif ( $a eq '-shared' ) {
65 } elsif ( $a eq '-static' ) {
68 } elsif ( $a eq '-s' ) {
70 diff -urN klibc-1.1.16.org/Makefile klibc-1.1.16/Makefile
71 --- klibc-1.1.16.org/Makefile 2006-01-06 07:11:43.000000000 +0100
72 +++ klibc-1.1.16/Makefile 2006-01-06 19:32:24.054818750 +0100
76 # Location for installation
78 -export bindir = $(prefix)/bin
79 -export libdir = $(prefix)/lib
80 -export mandir = $(prefix)/man
81 -export INSTALLDIR = $(prefix)/lib/klibc
82 +export prefix = $(rpm_prefix)
83 +export bindir = $(rpm_bindir)
84 +export libdir = $(rpm_libdir)
85 +export mandir = $(rpm_mandir)
86 +export INSTALLDIR = $(rpm_libdir)/klibc
89 # Create a fake .config as present in the kernel tree