1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: architecture/sparc64/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: There is a copy in powerpc64/parse-config
15 case "$SDECFG_SPARC64_OPT" in
20 echo_status "Altering arch_{machine,target} to sparc$x"
21 # tweak target and other defines
22 arch_machine=${arch_machine/64/$x}
23 arch_target=${arch_target/64/$x}
26 atstage native && arch_build=${arch_build/64/$x} || true
30 make distclean # wipe the previous build
31 var_remove GCC_WRAPPER_INSERT ' ' '-m64'
33 set_confopt # regen libdir and configure options
34 build_package ncurses ncurses.conf
37 if [ "$SDECFG_SPARC64_32BIT" = 1 ]; then
38 # TODO: make dietlibc parse-config -7 (or so) and this one -9 (or so) ,-)
39 x="${pkg//-/_}" ; x="${x//+/_}"
40 eval x=\$SDECFG_DIETLIBC_$x
42 echo_status "Building package for 64bit"
43 var_append GCC_WRAPPER_INSERT ' ' '-m64'
47 : # 32bit patch now in gcc package
50 echo_status "Patching package to default to 32bit"
51 var_append patchfiles ' ' \
52 "$base/architecture/$arch/pkg_$pkg.diff"
54 glibc|module-init-tools|modutils|iptables) # gdb
55 echo_status "Building for 64bit ..."
56 var_append GCC_WRAPPER_INSERT ' ' '-m64'
59 # usually nothing, except:
60 [ $pkg = kmod ] && hook_add preconf 5 'libdir=${libdir%64}'
63 var_append GCC_WRAPPER_INSERT ' ' '-m64'
64 hook_add postmake 9 "sparc64_build_32"
66 *) # including glibc32