Skip to contentSkip to conversation

gcc: let cpp rrecommend gcc.

PATCH In review Ismo Puustinen 3 participants 5 messages Mar 9, 2017 – Mar 10, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc: let cpp rrecommend gcc.

The file /usr/libexec/gcc/.../cc1 has been installed in package "gcc" instead of package "cpp", because FILES statements for both packages match the cc1 binary. Remove the attempt to install the file in cpp to avoid confusion.

However, cpp uses cc1. If cc1 is not installed, there are error messages such as: "cpp: error trying to exec 'cc1': execvp: No such file or directory". Add gcc to RRECOMMENDS_cpp to fix the problem.

---
 meta/recipes-devtools/gcc/gcc-target.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-target.inc +2 -1
index f436fa2..3a2927e 100644
@@ -93,8 +93,9 @@ FILES_gfortran-symlinks = "\
 FILES_cpp = "\
     ${bindir}/${TARGET_PREFIX}cpp* \
     ${base_libdir}/cpp \
-    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
+"
 FILES_cpp-symlinks = "${bindir}/cpp"
+RRECOMMENDS_cpp = "${PN}"
 
 FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov* \
     ${bindir}/${TARGET_PREFIX}gcov-tool* \
Signature · 1 line
2.9.3
#1 lore raw
Quoted 4 lines · Ismo Puustinen

The file /usr/libexec/gcc/.../cc1 has been installed in package "gcc" instead of package "cpp", because FILES statements for both packages match the cc1 binary. Remove the attempt to install the file in cpp to avoid confusion.

Perhaps it's better to package it in cpp and remove from gcc package

Quoted 36 lines

However, cpp uses cc1. If cc1 is not installed, there are error messages such as: "cpp: error trying to exec 'cc1': execvp: No such file or directory". Add gcc to RRECOMMENDS_cpp to fix the problem.

---
 meta/recipes-devtools/gcc/gcc-target.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-target.inc +2 -2
index f436fa2..3a2927e 100644
@@ -93,8 +93,9 @@ FILES_gfortran-symlinks = "\
 FILES_cpp = "\
     ${bindir}/${TARGET_PREFIX}cpp* \
     ${base_libdir}/cpp \
-    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
+"
 FILES_cpp-symlinks = "${bindir}/cpp"
+RRECOMMENDS_cpp = "${PN}"
 
 FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov* \
     ${bindir}/${TARGET_PREFIX}gcov-tool* \
--

2.9.3

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
In reply to Ismo Puustinen
Quoted 11 lines · Ismo Puustinen

The file /usr/libexec/gcc/.../cc1 has been installed in package "gcc" instead of package "cpp", because FILES statements for both packages match the cc1 binary. Remove the attempt to install the file in cpp to
avoid confusion.

However, cpp uses cc1. If cc1 is not installed, there are error messages
such as: "cpp: error trying to exec 'cc1': execvp: No such file or directory". Add gcc to RRECOMMENDS_cpp to fix the problem.

Quoted 4 lines

---
 meta/recipes-devtools/gcc/gcc-target.inc | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)

If its fatal without it shouldn't it be an RDEPENDS?

Cheers,

Richard

#2 lore raw
In reply to Khem Raj
Quoted 10 lines · Khem Raj
Quoted 7 lines

The file /usr/libexec/gcc/.../cc1 has been installed in package "gcc"
instead of package "cpp", because FILES statements for both packages
match the cc1 binary. Remove the attempt to install the file in cpp to
avoid confusion.

Perhaps it's better to package it in cpp and remove from gcc package

Maybe you're right -- that's how my Fedora system appears to be doing it. I'll prepare a new patch.

Ismo

#3 lore raw

PATCH v2 1/1 gcc: move cc1 binary file to package cpp.

In reply to Khem Raj

The file /usr/libexec/gcc/.../cc1 has been installed in package gcc instead of package cpp, because FILES statements for both packages match the cc1 binary. Move the file to package cpp and add cpp to RDEPENDS_gcc to fix the dependency.

Having the cc1 binary in cpp fixes errors such as: "cpp: error trying to exec 'cc1': execvp: No such file or directory".

---
 meta/recipes-devtools/gcc/gcc-target.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-target.inc +2 -1
index f436fa2..b245bdd 100644
@@ -31,7 +31,7 @@ PACKAGES = "\
 FILES_${PN} = "\
     ${bindir}/${TARGET_PREFIX}gcc* \
     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2* \
-    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
+    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
@@ -46,6 +46,7 @@ RRECOMMENDS_${PN} += "\
     libssp \
     libssp-dev \
 "
+RDEPENDS_${PN} += "cpp"
 
 FILES_${PN}-dev = "\
     ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
Signature · 1 line
2.9.3