]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-package-target.inc: add the symbol link /lib/cpp
authorDexuan Cui <dexuan.cui@intel.com>
Wed, 16 Nov 2011 09:49:44 +0000 (17:49 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 Nov 2011 23:33:21 +0000 (23:33 +0000)
When I was trying self-hosted-image, eglibc's do_install failed in the target:
ERROR: cannot stat bootparam_prot.h:
the cause is: rpcgen doesn't work properly: rpcgen can't exec /lib/cpp since
it doesn't exist.

According to http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html:
"if a C preprocessor is installed, /lib/cpp must be a reference to it, for
historical reasons. The usual placement of this binary is /usr/bin/cpp".

Typical distros, like Ubuntu, openSuSE, Fedora and RHEL, all comply with
the rule.

Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do try to
package ${base_libdir}/cpp:
 FILES_cpp = "\
  ${bindir}/${TARGET_PREFIX}cpp \
  ${base_libdir}/cpp \
  ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
But unluckily we didn't create a symbol link in do_install.
This patch adds the symbol link.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
meta/recipes-devtools/gcc/gcc-4.6.inc
meta/recipes-devtools/gcc/gcc-package-target.inc

index 7bf14e397ffd9c905141e992db23e70229fd67da..7cd08500d1e289cba690b3b8b4a71711cd218476 100644 (file)
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r17"
+PR = "r18"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
index f0f1a046ffad6ff52442c48289eb1d2e893680d4..307667057cb9d94cb9becf63aa2e7e29635559f3 100644 (file)
@@ -122,6 +122,8 @@ do_install () {
        ln -sf ${TARGET_PREFIX}g++ g++
        ln -sf ${TARGET_PREFIX}gcc gcc
        ln -sf ${TARGET_PREFIX}cpp cpp
+       install -d ${D}${base_libdir}
+       ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
        ln -sf g++ c++
        ln -sf gcc cc