summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-target.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-target.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc75
1 files changed, 10 insertions, 65 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 82da5ef82b..6b47c10413 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -33,8 +33,7 @@ PACKAGES = "\
33 ${PN} ${PN}-plugins ${PN}-symlinks \ 33 ${PN} ${PN}-plugins ${PN}-symlinks \
34 g++ g++-symlinks \ 34 g++ g++-symlinks \
35 cpp cpp-symlinks \ 35 cpp cpp-symlinks \
36 g77 g77-symlinks \ 36 ${@bb.utils.contains('FORTRAN', ',fortran', 'gfortran gfortran-symlinks', '', d)} \
37 gfortran gfortran-symlinks \
38 gcov gcov-symlinks \ 37 gcov gcov-symlinks \
39 ${PN}-doc \ 38 ${PN}-doc \
40 ${PN}-dev \ 39 ${PN}-dev \
@@ -61,7 +60,7 @@ RRECOMMENDS:${PN} += "\
61 libssp \ 60 libssp \
62 libssp-dev \ 61 libssp-dev \
63" 62"
64RDEPENDS:${PN} += "cpp" 63RDEPENDS:${PN} += "binutils cpp"
65 64
66FILES:${PN}-dev = "\ 65FILES:${PN}-dev = "\
67 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \ 66 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
@@ -81,23 +80,15 @@ FILES:${PN}-plugins = "\
81" 80"
82ALLOW_EMPTY:${PN}-plugins = "1" 81ALLOW_EMPTY:${PN}-plugins = "1"
83 82
84FILES:g77 = "\ 83INSANE_SKIP:${MLPREFIX}gfortran += "dev-deps"
85 ${bindir}/${TARGET_PREFIX}g77 \
86 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
87"
88FILES:g77-symlinks = "\
89 ${bindir}/g77 \
90 ${bindir}/f77 \
91"
92RRECOMMENDS:g77 = "\
93 libg2c \
94 libg2c-dev \
95"
96
97FILES:gfortran = "\ 84FILES:gfortran = "\
98 ${bindir}/${TARGET_PREFIX}gfortran \ 85 ${bindir}/${TARGET_PREFIX}gfortran \
99 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \ 86 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
100" 87"
88RDEPENDS:gfortran = "\
89 gcc \
90 libgfortran-dev \
91"
101RRECOMMENDS:gfortran = "\ 92RRECOMMENDS:gfortran = "\
102 libquadmath \ 93 libquadmath \
103 libquadmath-dev \ 94 libquadmath-dev \
@@ -141,20 +132,8 @@ FILES:${PN}-doc = "\
141" 132"
142 133
143do_compile () { 134do_compile () {
144 # Prevent full target sysroot path from being used in configargs.h header, 135 remove_sysroot_paths_from_configargs '/'
145 # as it will be rewritten when used by other sysroots preventing support 136 remove_sysroot_paths_from_checksum_options '${STAGING_DIR_TARGET}' '/'
146 # for gcc plugins. Additionally the path is embeddeded into the output
147 # binary, this prevents building a reproducible binary.
148 oe_runmake configure-gcc
149 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h
150 sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h
151
152 # Prevent sysroot/workdir paths from being used in checksum-options.
153 # checksum-options is used to generate a checksum which is embedded into
154 # the output binary.
155 oe_runmake TARGET-gcc=checksum-options all-gcc
156 sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
157 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options
158 137
159 oe_runmake all-host 138 oe_runmake all-host
160} 139}
@@ -198,11 +177,6 @@ do_install () {
198 # Not sure why we end up with these but we don't want them... 177 # Not sure why we end up with these but we don't want them...
199 rm -f ${TARGET_PREFIX}${TARGET_PREFIX}* 178 rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
200 179
201 # Symlinks so we can use these trivially on the target
202 if [ -e ${TARGET_PREFIX}g77 ]; then
203 ln -sf ${TARGET_PREFIX}g77 g77 || true
204 ln -sf g77 f77 || true
205 fi
206 if [ -e ${TARGET_PREFIX}gfortran ]; then 180 if [ -e ${TARGET_PREFIX}gfortran ]; then
207 ln -sf ${TARGET_PREFIX}gfortran gfortran || true 181 ln -sf ${TARGET_PREFIX}gfortran gfortran || true
208 ln -sf gfortran f95 || true 182 ln -sf gfortran f95 || true
@@ -219,37 +193,8 @@ do_install () {
219 install -d ${D}${libdir}/bfd-plugins 193 install -d ${D}${libdir}/bfd-plugins
220 ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so 194 ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
221 chown -R root:root ${D} 195 chown -R root:root ${D}
222}
223 196
224do_install:append () { 197 cleanup_installed_include_fixed
225 #
226 # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header
227 # files and places the modified files into
228 # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the
229 # build not deterministic. The following code prunes all those headers
230 # except those under include-fixed/linux, *limits.h and README, yielding
231 # the same include-fixed folders no matter what sysroot
232
233 include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed"
234 for f in $(find ${include_fixed} -type f); do
235 case $f in
236 */include-fixed/linux/*)
237 continue
238 ;;
239 */include-fixed/*limits.h)
240 continue
241 ;;
242 */include-fixed/README)
243 continue
244 ;;
245 *)
246 # remove file and directory if empty
247 bbdebug 2 "Pruning $f"
248 rm $f
249 find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \;
250 ;;
251 esac
252 done
253} 198}
254 199
255# Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross 200# Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross