All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gcc-target: Fix libatomic dependency tracking issues
@ 2013-09-22 10:54 Richard Purdie
  2013-09-23  4:56 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2013-09-22 10:54 UTC (permalink / raw)
  To: openembedded-core

The --enable-dependency-tracking option was added to workaround build
issues in libatomic. This fixes that build problem properly and removes
the flag since the dependency tracking code appears to be full of races
which are much deeper and harder to fix.

As per the automake manual, dependency tracking is only useful and worth
the build performance cost if you are doing more than one compile of the same
source code which in most cases we are not so this is a good thing anyway.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch b/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch
new file mode 100644
index 0000000..6ea4f42
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch
@@ -0,0 +1,41 @@
+gcc 4.8 won't build with --disable-dependency-tracking since the *.Ppo files
+don't get created unless --enable-dependency-tracking is true.
+
+This patch ensures we only use those compiler options when its enabled.
+
+Upstream-Status: Submitted
+
+(Problem was already reported upstream, attached this patch there
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
+
+RP 
+2012/09/22
+
+Index: gcc-4.8.1/libatomic/Makefile.am
+===================================================================
+--- gcc-4.8.1.orig/libatomic/Makefile.am	2013-01-14 18:16:23.000000000 +0000
++++ gcc-4.8.1/libatomic/Makefile.am	2013-09-22 10:38:18.904064750 +0000
+@@ -100,7 +100,8 @@
+ IFUNC_DEF	= -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT	= $(word $(PAT_S),$(IFUNC_OPTIONS))
+ 
+-M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS		= 
+ M_SIZE		= -DN=$(PAT_N)
+ M_IFUNC		= $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE		= $(PAT_BASE)_n.c
+Index: gcc-4.8.1/libatomic/Makefile.in
+===================================================================
+--- gcc-4.8.1.orig/libatomic/Makefile.in	2013-05-31 09:09:26.000000000 +0000
++++ gcc-4.8.1/libatomic/Makefile.in	2013-09-22 10:40:42.520059917 +0000
+@@ -298,7 +298,8 @@
+ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS = 
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index c7e3e16..e1179ac 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -5,7 +5,7 @@ EXTRA_OECONF_PATHS = " \
     --with-sysroot=/ \
     --with-build-sysroot=${STAGING_DIR_TARGET} \
     --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
-    --with-gxx-include-dir=${includedir}/c++/ --enable-dependency-tracking"
+    --with-gxx-include-dir=${includedir}/c++/"
 
 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR} -I${B}/gcc/include/ "
 




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

* Re: [PATCH] gcc-target: Fix libatomic dependency tracking issues
  2013-09-22 10:54 [PATCH] gcc-target: Fix libatomic dependency tracking issues Richard Purdie
@ 2013-09-23  4:56 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2013-09-23  4:56 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3615 bytes --]

On Sunday, September 22, 2013, Richard Purdie wrote:

> The --enable-dependency-tracking option was added to workaround build
> issues in libatomic. This fixes that build problem properly and removes
> the flag since the dependency tracking code appears to be full of races
> which are much deeper and harder to fix.
>
> As per the automake manual, dependency tracking is only useful and worth
> the build performance cost if you are doing more than one compile of the
> same
> source code which in most cases we are not so this is a good thing anyway.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org<javascript:;>
> >


I agree we should apply this patch via recipes and also submit to gcc
upstream as well

---
> diff --git
> a/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch
> b/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch
> new file mode 100644
> index 0000000..6ea4f42
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch
> @@ -0,0 +1,41 @@
> +gcc 4.8 won't build with --disable-dependency-tracking since the *.Ppo
> files
> +don't get created unless --enable-dependency-tracking is true.
> +
> +This patch ensures we only use those compiler options when its enabled.
> +
> +Upstream-Status: Submitted
> +
> +(Problem was already reported upstream, attached this patch there
> +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
> +
> +RP
> +2012/09/22
> +
> +Index: gcc-4.8.1/libatomic/Makefile.am
> +===================================================================
> +--- gcc-4.8.1.orig/libatomic/Makefile.am       2013-01-14
> 18:16:23.000000000 +0000
> ++++ gcc-4.8.1/libatomic/Makefile.am    2013-09-22 10:38:18.904064750 +0000
> +@@ -100,7 +100,8 @@
> + IFUNC_DEF     = -DIFUNC_ALT=$(PAT_S)
> + IFUNC_OPT     = $(word $(PAT_S),$(IFUNC_OPTIONS))
> +
> +-M_DEPS                = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
> ++@AMDEP_TRUE@M_DEPS            = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
> ++@AMDEP_FALSE@M_DEPS           =
> + M_SIZE                = -DN=$(PAT_N)
> + M_IFUNC               = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
> + M_FILE                = $(PAT_BASE)_n.c
> +Index: gcc-4.8.1/libatomic/Makefile.in
> +===================================================================
> +--- gcc-4.8.1.orig/libatomic/Makefile.in       2013-05-31
> 09:09:26.000000000 +0000
> ++++ gcc-4.8.1/libatomic/Makefile.in    2013-09-22 10:40:42.520059917 +0000
> +@@ -298,7 +298,8 @@
> + PAT_S = $(word 3,$(PAT_SPLIT))
> + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
> + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
> +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
> ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
> ++@AMDEP_FALSE@M_DEPS =
> + M_SIZE = -DN=$(PAT_N)
> + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
> + M_FILE = $(PAT_BASE)_n.c
> diff --git a/meta/recipes-devtools/gcc/gcc-target.inc
> b/meta/recipes-devtools/gcc/gcc-target.inc
> index c7e3e16..e1179ac 100644
> --- a/meta/recipes-devtools/gcc/gcc-target.inc
> +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> @@ -5,7 +5,7 @@ EXTRA_OECONF_PATHS = " \
>      --with-sysroot=/ \
>      --with-build-sysroot=${STAGING_DIR_TARGET} \
>
>  --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
> -    --with-gxx-include-dir=${includedir}/c++/
> --enable-dependency-tracking"
> +    --with-gxx-include-dir=${includedir}/c++/"
>
>  ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR} -I${B}/gcc/include/ "
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 4296 bytes --]

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

end of thread, other threads:[~2013-09-23  4:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-22 10:54 [PATCH] gcc-target: Fix libatomic dependency tracking issues Richard Purdie
2013-09-23  4:56 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.