AlxMAX Posted July 12, 2005 Report Share Posted July 12, 2005 As I haven't found something similar, I would like to ask you some questions about rebuilding the glibc-2.3.5 package. Prior to any compilation, I have created a folder hierarchy in order to rpmbuild as a simple user and I created the .rpmmacros and the .rpmrc files in my home folder. So, I have downloaded the glibc-2.3.5-2mdk.src.rpm and I wanted it recompiled with gcc 4.0.1-0.2mdk and some pentium 4 optimisation flags: -O2 -pipe -march=i686 -mtune=pentium4. The only way to do it is by changing the glibc.spec file, more precisely in the BuildGlibc function. There, in the case $arch in switch, in the case $arch = i[3456]86, I have put BuildFlags="-pipe -march=$arch -mtune=pentium4" and then launched the compilation with rpmbuild -bb --target i686-linux glibc.spec. The compilation stopped saying there were no build-i586-linux folder for alternate ld.so test. Digging further in the specfile, I found these: case $arch in i686|athlon) base_arch=i586;; *) base_arch=$arch;; esac [[ "$arch" = "$base_arch" ]] && ! [[ -n "$nptl" ]] && return 0 [[ -d "build-$base_arch-linux" ]] || { echo "ERROR: PrepareGlibcTest: build-$base_arch-linux does not exist for alternate ld.so test" return 1 } check_flags="$check_flags -l build-$base_arch-linux/elf/ld.so" echo "%_smp_mflags -d build-$arch-linux$nptl $check_flags" >> $CheckList at the end of the BuildGlibc function. Could someone explain me what is this all about? I am confused by the switch/case and then by the single equal sign right after the end of the switch/case. Is it supposed to be like this or is it supposed to be a single equal sign? I have tried to put those lines like this: case $arch in i686|athlon) base_arch="i586";; *) base_arch=$arch;; esac [[ "$arch" == "$base_arch" ]] && ! [[ -n "$nptl" ]] && return 0 [[ -d "build-$base_arch-linux" ]] || { echo "ERROR: PrepareGlibcTest: build-$base_arch-linux does not exist for alternate ld.so test" return 1 } check_flags="$check_flags -l build-$base_arch-linux/elf/ld.so" echo "%_smp_mflags -d build-$arch-linux$nptl $check_flags" >> $CheckList but I still have the error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.