Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] gcc: Drop ARCH_FLAGS_FOR_TARGET usage
@ 2014-04-27  0:22 Richard Purdie
  2014-04-27  5:05 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2014-04-27  0:22 UTC (permalink / raw)
  To: openembedded-core

As far as I can tell this variable is now completely unneeded. It would
only ever get used in target builds and these are now correctly done
in the target environment namespace, not any of our cross environments.
As such, CC and other variables contain the correct compilers and other
tune options and these are correctly picked up when building libgcc,
libstdc++ and others.

I tried to figure out where else these would make any sense and couldn't
find anything. Builds appear fine without them so lets drop the complexity
including the patch adding in this flag to gcc.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index 855ec26..42b4212 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -22,7 +22,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
 		   file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8"
 
 SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
-	   file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
 	   file://0002-uclibc-conf.patch \
 	   file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
 	   file://0004-uclibc-locale.patch \
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 3cc5efa..7ff1a10 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -68,11 +68,6 @@ CPPFLAGS = ""
 EXTRA_OECONF_append_powerpc = " --with-long-double-128"
 EXTRA_OECONF_append_powerpc64 = " --with-long-double-128"
 
-# Used by configure to define additional values for FLAGS_FOR_TARGET -
-# passed to all the compilers.
-ARCH_FLAGS_FOR_TARGET = "${TARGET_CC_ARCH}"
-EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
-
 SYSTEMHEADERS = "${target_includedir}"
 SYSTEMLIBS = "${target_base_libdir}/"
 SYSTEMLIBS1 = "${target_libdir}/"
@@ -121,7 +116,6 @@ do_configure () {
 	export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
 	export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
 	export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
-	export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
 	export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
 	export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
 	export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 2e82a09..c59c35a 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -7,8 +7,6 @@ EXTRA_OECONF_PATHS = " \
     --with-sysroot=${STAGING_DIR_TARGET} \
     --with-build-sysroot=${STAGING_DIR_TARGET}"
 
-ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
-
 EXTRA_OECONF += "--disable-libunwind-exceptions"
 EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
 
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 3412aa8..aff395c 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -7,8 +7,6 @@ EXTRA_OECONF_PATHS = " \
     --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
     --with-gxx-include-dir=${includedir}/c++/"
 
-ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR} -I${B}/gcc/include/ "
-
 PACKAGES = "\
   ${PN} ${PN}-plugins ${PN}-symlinks \
   g++ g++-symlinks \




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gcc: Drop ARCH_FLAGS_FOR_TARGET usage
  2014-04-27  0:22 [PATCH] gcc: Drop ARCH_FLAGS_FOR_TARGET usage Richard Purdie
@ 2014-04-27  5:05 ` Khem Raj
  2014-04-27  8:33   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2014-04-27  5:05 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Sat, Apr 26, 2014 at 5:22 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> As far as I can tell this variable is now completely unneeded. It would
> only ever get used in target builds and these are now correctly done
> in the target environment namespace, not any of our cross environments.
> As such, CC and other variables contain the correct compilers and other
> tune options and these are correctly picked up when building libgcc,
> libstdc++ and others.
>
> I tried to figure out where else these would make any sense and couldn't
> find anything. Builds appear fine without them so lets drop the complexity
> including the patch adding in this flag to gcc.

AFAR these were needed when doing SDK builds which was a shortcoming
in gcc itself
have you tried a SDK build with it ?

>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
> index 855ec26..42b4212 100644
> --- a/meta/recipes-devtools/gcc/gcc-4.8.inc
> +++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
> @@ -22,7 +22,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
>                    file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8"
>
>  SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
> -          file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
>            file://0002-uclibc-conf.patch \
>            file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
>            file://0004-uclibc-locale.patch \
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index 3cc5efa..7ff1a10 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -68,11 +68,6 @@ CPPFLAGS = ""
>  EXTRA_OECONF_append_powerpc = " --with-long-double-128"
>  EXTRA_OECONF_append_powerpc64 = " --with-long-double-128"
>
> -# Used by configure to define additional values for FLAGS_FOR_TARGET -
> -# passed to all the compilers.
> -ARCH_FLAGS_FOR_TARGET = "${TARGET_CC_ARCH}"
> -EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
> -
>  SYSTEMHEADERS = "${target_includedir}"
>  SYSTEMLIBS = "${target_base_libdir}/"
>  SYSTEMLIBS1 = "${target_libdir}/"
> @@ -121,7 +116,6 @@ do_configure () {
>         export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
>         export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
>         export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
> -       export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
>         export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
>         export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
>         export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
> diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
> index 2e82a09..c59c35a 100644
> --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
> @@ -7,8 +7,6 @@ EXTRA_OECONF_PATHS = " \
>      --with-sysroot=${STAGING_DIR_TARGET} \
>      --with-build-sysroot=${STAGING_DIR_TARGET}"
>
> -ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
> -
>  EXTRA_OECONF += "--disable-libunwind-exceptions"
>  EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
>
> diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> index 3412aa8..aff395c 100644
> --- a/meta/recipes-devtools/gcc/gcc-target.inc
> +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> @@ -7,8 +7,6 @@ EXTRA_OECONF_PATHS = " \
>      --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
>      --with-gxx-include-dir=${includedir}/c++/"
>
> -ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR} -I${B}/gcc/include/ "
> -
>  PACKAGES = "\
>    ${PN} ${PN}-plugins ${PN}-symlinks \
>    g++ g++-symlinks \
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gcc: Drop ARCH_FLAGS_FOR_TARGET usage
  2014-04-27  5:05 ` Khem Raj
@ 2014-04-27  8:33   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2014-04-27  8:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On Sat, 2014-04-26 at 22:05 -0700, Khem Raj wrote:
> On Sat, Apr 26, 2014 at 5:22 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > As far as I can tell this variable is now completely unneeded. It would
> > only ever get used in target builds and these are now correctly done
> > in the target environment namespace, not any of our cross environments.
> > As such, CC and other variables contain the correct compilers and other
> > tune options and these are correctly picked up when building libgcc,
> > libstdc++ and others.
> >
> > I tried to figure out where else these would make any sense and couldn't
> > find anything. Builds appear fine without them so lets drop the complexity
> > including the patch adding in this flag to gcc.
> 
> AFAR these were needed when doing SDK builds which was a shortcoming
> in gcc itself
> have you tried a SDK build with it ?

Yes, it seems to build just fine...

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-27  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-27  0:22 [PATCH] gcc: Drop ARCH_FLAGS_FOR_TARGET usage Richard Purdie
2014-04-27  5:05 ` Khem Raj
2014-04-27  8:33   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox