Lines 359-364
Link Here
|
359 |
local host=$2 |
359 |
local host=$2 |
360 |
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}} |
360 |
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}} |
361 |
|
361 |
|
|
|
362 |
local kv=${KV:-$KV_FULL} |
363 |
[[ -z ${kv} ]] && die "toolchain-funcs.eclass: Kernel version could not be determined, please inherit kernel-2 or linux-info" |
364 |
|
362 |
case ${host} in |
365 |
case ${host} in |
363 |
aarch64*) ninj aarch64 arm;; |
366 |
aarch64*) ninj aarch64 arm;; |
364 |
alpha*) echo alpha;; |
367 |
alpha*) echo alpha;; |
Lines 371-377
Link Here
|
371 |
# Starting with linux-2.6.24, the 'x86_64' and 'i386' |
374 |
# Starting with linux-2.6.24, the 'x86_64' and 'i386' |
372 |
# trees have been unified into 'x86'. |
375 |
# trees have been unified into 'x86'. |
373 |
# FreeBSD still uses i386 |
376 |
# FreeBSD still uses i386 |
374 |
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) || ${host} == *freebsd* ]] ; then |
377 |
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${kv}) -lt $(KV_to_int 2.6.24) || ${host} == *freebsd* ]] ; then |
375 |
echo i386 |
378 |
echo i386 |
376 |
else |
379 |
else |
377 |
echo x86 |
380 |
echo x86 |
Lines 386-394
Link Here
|
386 |
# Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees |
389 |
# Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees |
387 |
# have been unified into simply 'powerpc', but until 2.6.16, |
390 |
# have been unified into simply 'powerpc', but until 2.6.16, |
388 |
# ppc32 is still using ARCH="ppc" as default |
391 |
# ppc32 is still using ARCH="ppc" as default |
389 |
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] ; then |
392 |
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${kv}) -ge $(KV_to_int 2.6.16) ]] ; then |
390 |
echo powerpc |
393 |
echo powerpc |
391 |
elif [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] ; then |
394 |
elif [[ ${type} == "kern" ]] && [[ $(KV_to_int ${kv}) -eq $(KV_to_int 2.6.15) ]] ; then |
392 |
if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then |
395 |
if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then |
393 |
echo powerpc |
396 |
echo powerpc |
394 |
else |
397 |
else |
Lines 415-421
Link Here
|
415 |
x86_64*) |
418 |
x86_64*) |
416 |
# Starting with linux-2.6.24, the 'x86_64' and 'i386' |
419 |
# Starting with linux-2.6.24, the 'x86_64' and 'i386' |
417 |
# trees have been unified into 'x86'. |
420 |
# trees have been unified into 'x86'. |
418 |
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.24) ]] ; then |
421 |
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${kv}) -ge $(KV_to_int 2.6.24) ]] ; then |
419 |
echo x86 |
422 |
echo x86 |
420 |
else |
423 |
else |
421 |
ninj x86_64 amd64 |
424 |
ninj x86_64 amd64 |