Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 468462 - sys-devel/kgcc64: handling of compat symlinks on hppa (hppa64-linux- vs hppa64-linux-gnu-)
Summary: sys-devel/kgcc64: handling of compat symlinks on hppa (hppa64-linux- vs hppa6...
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Installation Handbook (show other bugs)
Hardware: HPPA Linux
: Normal minor (vote)
Assignee: Docs Team
URL: http://thread.gmane.org/gmane.linux.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-03 15:03 UTC by Ulrich Teichert
Modified: 2013-05-09 05:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Teichert 2013-05-03 15:03:52 UTC
After an emerge of kgcc64 4.6.3, the compiled gcc got named hppa64-unknown-linux-gnu, but the kernel Makefile wanted hppa64-linux-gnu.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-03 15:30:36 UTC
kgcc64 installs both hppa64-linux-* and hppa64-unknown-linux-gnu-* but the kernel expects (Debian-style) hppa64-linux-gnu-* executables.

The way to resolve this is to set CC on the make command line (bad) or to set CONFIG_CROSS_COMPILE to "hppa64-unknown-linux-gnu-" in menuconfig (good).
Comment 2 SpanKY gentoo-dev 2013-05-03 16:12:35 UTC
(In reply to comment #1)

this is not the whole story

the *native* builds have selected hppa64-linux- since 2007 which is why we install those compat symlinks

the *cross-compile* builds have changed over time as to what it selects, but the current default is hppa64-linux-gnu-

we don't care about the cross-compile scenario.  that has long been the case for most arches that you need to set CROSS_COMPILE either on the command line or in the .config.

that leaves the native case.  and the lack of actual details in this bug report.  what exactly is the problem ?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-04 16:08:06 UTC
(In reply to comment #2)
> the *native* builds have selected hppa64-linux- since 2007 which is why we
> install those compat symlinks

Those haven't worked in years. Without setting CROSS_COMPILE (vanilla 3.9.0 sources):

 * Running make -j1 ...
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make: hppa64-linux-gnu-gcc: Command not found
make: hppa64-linux-gnu-gcc: Command not found
/usr/src/linux-3.9.0/scripts/gcc-version.sh: line 25: hppa64-linux-gnu-gcc: command not found
/usr/src/linux-3.9.0/scripts/gcc-version.sh: line 26: hppa64-linux-gnu-gcc: command not found
Sorry, GCC v3.3 or above is required to build the kernel.
make: *** [checkbin] Error 1
 * Stage -j1 was last.

There was an attempt to "fix" this in 2012, and indeed it was fixed for Debian's case, not Gentoo's. This is why our documentation needs to document this, even if some kernel sources do get it right.

Of particular note in the 3.9.0 sources is that it tries to run hppa-linux-gnu-gcc is certain circumstances, even with CROSS_COMPILE set to a valid prefix.

> the *cross-compile* builds have changed over time as to what it selects, but
> the current default is hppa64-linux-gnu-
> 
> we don't care about the cross-compile scenario.  that has long been the case
> for most arches that you need to set CROSS_COMPILE either on the command
> line or in the .config.

Yes we do care, since you cannot boot a C8000 with a 32-bit kernel.

> that leaves the native case.  and the lack of actual details in this bug
> report.  what exactly is the problem ?

Our documentation should describe what is needed to build a kernel. In this case, set a proper CROSS_COMPILE value in the .config. Even if the kernel sources get fixed, this is a major pitfall we should document because it keeps breaking from time to time.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-04 16:09:42 UTC
See also
"PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit."
http://lkml.indiana.edu/hypermail/linux/kernel/1202.3/00725.html

for the last attempt to get the compiler prefix right.
Comment 5 SpanKY gentoo-dev 2013-05-04 16:48:03 UTC
(In reply to comment #4)

that's because someone broke the native compile case and didn't notice.  these are the sort of things you should report rather than ignore.

specifically, this commit broke it:
commit 991b7d6e6ffe9373dca7269a5d0213c1545dee1f
Author: Kyle McMartin <kyle@shortfin.cabal.ca>
Date:   Thu Oct 18 13:54:51 2007 -0700

    [PARISC] Attempt to clean up parisc/Makefile
Comment 6 SpanKY gentoo-dev 2013-05-09 05:09:04 UTC
upstream has accepted my patch