1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: architecture/powerpc64/parse-config
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # Note: this is a copy of sparc64/parse-config
15 echo_status "Altering arch_{machine,target} to powerpc"
16 # tweak target and other defines
17 atstage native && arch_build=${arch_build/64/}
18 arch_machine=${arch_machine/64/}
19 arch_target=${arch_target/64/}
23 # fork, make a copy of all variables, so we fully restore to normal
26 arch_sizeof_long=4 arch_sizeof_char_p=4
27 var_append GCC_WRAPPER_INSERT ' ' '-m32'
28 var_append CPP_WRAPPER_INSERT ' ' '-m32'
29 function set_confopt () { : ; } # do not reset the confopt, ...
30 build_package $pkg $pkg.conf
33 # let it continue to build just normal, as if "nothing" happened
38 if [ "$SDECFG_POWERPC64_32" = 1 ]; then
40 x="${pkg//-/_}" ; x="${x//+/_}"
41 eval x=\$SDECFG_DIETLIBC_$x
42 if [ $pkg = "dietlibc" -o "$x" = 1 ]; then
43 echo_status "Building package for 64bit"
44 var_append GCC_WRAPPER_INSERT ' ' '-m64'
47 glibc32|linux-header|linux|kmod|module-init-tools|yaboot|grub2)
48 # usually nothing, except:
49 [ $pkg = kmod ] && hook_add preconf 5 'libdir=${libdir%64}'
52 # as we otherwise default to 32-bit
53 var_append GCC_WRAPPER_INSERT ' ' '-m64'
55 binutils|gcc|gcc-spe) # gdb
56 #alter_arch # to 32-bit "powerpc"
57 #arch_target=${arch_target/powerpc/powerpc64}
60 alter_arch # to 32-bit "powerpc"
64 elif [ "$SDECFG_MULTILIB" = 1 ]; then
67 # we need a 32bit lib for yaboot :-(
68 pkginstalled yaboot && hook_add preconf 1 "powerpc64_build32"