> Wed, 4 Apr 2012 09:23:19 -0400
> From: Smlacc1 <[email protected]>
>
> Im trying the same thing (gcc 4.6.3), but on an arm processor. I succesfully
> finished lfs standard, and am now trying hlfs. On the stage 1 section,
> modifying linux.h to add the fpic options looks a bit different. The file in
> question is "linx-eabi.h" under gcc/config/arm, and the "#define CC1_SPEC
> line looks like this:
>
> #define CC1_SPEC. \
> LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
> GNU_USER_TARGET_CC1_SPEC " "
> ANDROID_CC1_SPEC)
>
>
> Any ideas how i format this to add the fpic part?
PURE GUESSWORK
I guess I'd try either editing linux-eabi.h like so:
#define CC1_SPEC. \
LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC "
%{fno-pic|fno-PIC|fpic|fPIC:;:-fPIC}", \
GNU_USER_TARGET_CC1_SPEC "
%{fno-pic|fno-PIC|fpic|fPIC:;:-fPIC} " ANDROID_CC1_SPEC)
OR perhaps modifying the definition of GNU_USER_TARGET_CC1_SPEC, which is in
gcc/config/gnu-user.h
#define GNU_USER_TARGET_CC1_SPEC "%{profile:-p}"
to
#define GNU_USER_TARGET_CC1_SPEC "%{profile:-p}
%{fno-pic|fno-PIC|fpic|fPIC:;:-fPIC}"
Either way, the HLFS book says that glibc will check for default PIC compiler,
so look for
"checking whether -fPIC is default... yes"
in the Temporary glibc's configure run to see if it works.
-dean takemori
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page