All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] gcc: Abstract long double configuration into python function
@ 2014-08-14  7:51 Khem Raj
  2014-08-14  7:51 ` [PATCH 2/3] gcc-cross-initial: Put limits.h in gccdir/include Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Khem Raj @ 2014-08-14  7:51 UTC (permalink / raw)
  To: openembedded-core

musl does not support IBM 128 long double for ppc, instead of
doing complex overrides move it into a pythong snippet which
is easier to read and more compact.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-common.inc           |    5 +++++
 meta/recipes-devtools/gcc/gcc-configure-common.inc |    5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index 66a18d9..e06b6ee 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -25,6 +25,11 @@ def get_gcc_mips_plt_setting(bb, d):
         return "--with-mips-plt"
     return ""
 
+def get_long_double_setting(bb, d):
+    if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC', True) in [ 'uclibc', 'eglibc' ]:
+        return "--with-long-double-128"
+    return ""
+
 def get_gcc_multiarch_setting(bb, d):
     target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
     multiarch_options = {
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 75fb379..3934bcb 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -46,6 +46,7 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) !=
                 ${EXTRA_OECONF_FPU} \
                 ${EXTRA_OECONF_PATHS} \
                 ${@get_gcc_mips_plt_setting(bb, d)} \
+                ${@get_long_double_setting(bb, d)} \
                 ${@get_gcc_multiarch_setting(bb, d)}"
 
 export ac_cv_path_SED = 'sed'
@@ -64,10 +65,6 @@ EXTRA_OECONF_append_mips64el    = " --with-abi=64 --with-arch-64=mips64 --with-t
 EXTRA_OECONF_FPU ??= ""
 CPPFLAGS = ""
 
-# powerpc needs this to comply with the ABI
-EXTRA_OECONF_append_powerpc = " --with-long-double-128"
-EXTRA_OECONF_append_powerpc64 = " --with-long-double-128"
-
 SYSTEMHEADERS = "${target_includedir}"
 SYSTEMLIBS = "${target_base_libdir}/"
 SYSTEMLIBS1 = "${target_libdir}/"
-- 
1.7.10.4



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

* [PATCH 2/3] gcc-cross-initial: Put limits.h in gccdir/include
  2014-08-14  7:51 [PATCH 1/3] gcc: Abstract long double configuration into python function Khem Raj
@ 2014-08-14  7:51 ` Khem Raj
  2014-08-14  7:51 ` [PATCH 3/3] python: Fix build on musl Khem Raj
  2014-08-14 10:13 ` [PATCH 1/3] gcc: Abstract long double configuration into python function Peter A. Bigot
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2014-08-14  7:51 UTC (permalink / raw)
  To: openembedded-core

musl e.g. is configured to not use fixed-include
which is an improvement btw. but libgcc-initial configure
has tests which probe for limits.h and since we put
it in include-fixed/ dir and that dir does not appear
in gcc's internal default search path the configure tests
for CPP detection fail and libgcc-initial can not be compiled.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-cross-initial.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 5a6da8b..448d311 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -66,7 +66,7 @@ do_install () {
 	# includes real limits.h but this real limits.h is not staged yet
 	# so we overwirte the generated include-fixed/limits.h for gcc-cross-initial
 	# to get rid references to real limits.h
-	cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h
+	cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include/limits.h
 
 	# gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
 	case ${PN} in
-- 
1.7.10.4



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

* [PATCH 3/3] python: Fix build on musl
  2014-08-14  7:51 [PATCH 1/3] gcc: Abstract long double configuration into python function Khem Raj
  2014-08-14  7:51 ` [PATCH 2/3] gcc-cross-initial: Put limits.h in gccdir/include Khem Raj
@ 2014-08-14  7:51 ` Khem Raj
  2014-08-14 10:13 ` [PATCH 1/3] gcc: Abstract long double configuration into python function Peter A. Bigot
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2014-08-14  7:51 UTC (permalink / raw)
  To: openembedded-core

musl has posix_close which conflicts in python
so lets rename it.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/python/posix_close.patch                |   43 ++++++++++++++++++++
 meta/recipes-devtools/python/python_2.7.3.bb       |    1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python/posix_close.patch

diff --git a/meta/recipes-devtools/python/python/posix_close.patch b/meta/recipes-devtools/python/python/posix_close.patch
new file mode 100644
index 0000000..725531a
--- /dev/null
+++ b/meta/recipes-devtools/python/python/posix_close.patch
@@ -0,0 +1,43 @@
+backport from http://bugs.python.org/issue20594
+
+- Issue #20594: Avoid name clash with the libc function posix_close.
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1392131776 18000
+# Node ID 1d253360d5a6d8d987fb2480e26f4fcc2d730932
+# Parent  41e49f1c5bd8ff48a6c18804c958e82c659daab3
+avoid name clash with posix_close (closes #20594)
+
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -6581,8 +6581,12 @@ PyDoc_STRVAR(posix_close__doc__,
+ "close(fd)\n\n\
+ Close a file descriptor (for low level IO).");
+ 
+-static PyObject *
+-posix_close(PyObject *self, PyObject *args)
++/*
++The underscore at end of function name avoids a name clash with the libc
++function posix_close.
++*/
++static PyObject *
++posix_close_(PyObject *self, PyObject *args)
+ {
+     int fd, res;
+     if (!PyArg_ParseTuple(args, "i:close", &fd))
+@@ -8960,7 +8964,7 @@ static PyMethodDef posix_methods[] = {
+     {"tcsetpgrp",       posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},
+ #endif /* HAVE_TCSETPGRP */
+     {"open",            posix_open, METH_VARARGS, posix_open__doc__},
+-    {"close",           posix_close, METH_VARARGS, posix_close__doc__},
++    {"close",           posix_close_, METH_VARARGS, posix_close__doc__},
+     {"closerange",      posix_closerange, METH_VARARGS, posix_closerange__doc__},
+     {"dup",             posix_dup, METH_VARARGS, posix_dup__doc__},
+     {"dup2",            posix_dup2, METH_VARARGS, posix_dup2__doc__},
+
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 5be9073..84a554f 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -37,6 +37,7 @@ SRC_URI += "\
   file://python-fix-build-error-with-Readline-6.3.patch \
   file://python-2.7.3-CVE-2014-1912.patch \
   file://json-flaw-fix.patch \
+  file://file://posix_close.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
-- 
1.7.10.4



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

* Re: [PATCH 1/3] gcc: Abstract long double configuration into python function
  2014-08-14  7:51 [PATCH 1/3] gcc: Abstract long double configuration into python function Khem Raj
  2014-08-14  7:51 ` [PATCH 2/3] gcc-cross-initial: Put limits.h in gccdir/include Khem Raj
  2014-08-14  7:51 ` [PATCH 3/3] python: Fix build on musl Khem Raj
@ 2014-08-14 10:13 ` Peter A. Bigot
  2 siblings, 0 replies; 4+ messages in thread
From: Peter A. Bigot @ 2014-08-14 10:13 UTC (permalink / raw)
  To: openembedded-core

On 08/14/2014 02:51 AM, Khem Raj wrote:
> musl does not support IBM 128 long double for ppc, instead of
> doing complex overrides move it into a pythong snippet which
> is easier to read and more compact.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   meta/recipes-devtools/gcc/gcc-common.inc           |    5 +++++
>   meta/recipes-devtools/gcc/gcc-configure-common.inc |    5 +----
>   2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
> index 66a18d9..e06b6ee 100644
> --- a/meta/recipes-devtools/gcc/gcc-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-common.inc
> @@ -25,6 +25,11 @@ def get_gcc_mips_plt_setting(bb, d):
>           return "--with-mips-plt"
>       return ""
>   
> +def get_long_double_setting(bb, d):
> +    if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC', True) in [ 'uclibc', 'eglibc' ]:
> +        return "--with-long-double-128"
> +    return ""
> +
>   def get_gcc_multiarch_setting(bb, d):
>       target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
>       multiarch_options = {
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index 75fb379..3934bcb 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -46,6 +46,7 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) !=
>                   ${EXTRA_OECONF_FPU} \
>                   ${EXTRA_OECONF_PATHS} \
>                   ${@get_gcc_mips_plt_setting(bb, d)} \
> +                ${@get_long_double_setting(bb, d)} \

This conflicted with my earlier whitespace patch to this file.  I've 
rebased it into my series for the next release, unless Khem objects.  
I'll resend that after some testing and further discussion of how to fix 
the C++11 ABI issue.

Patches 78129 and 78135 to gcc-cross-initial.inc do not conflict with my 
changes to the same file so I'm not planning to absorb them.

Peter

>                   ${@get_gcc_multiarch_setting(bb, d)}"
>   
>   export ac_cv_path_SED = 'sed'
> @@ -64,10 +65,6 @@ EXTRA_OECONF_append_mips64el    = " --with-abi=64 --with-arch-64=mips64 --with-t
>   EXTRA_OECONF_FPU ??= ""
>   CPPFLAGS = ""
>   
> -# powerpc needs this to comply with the ABI
> -EXTRA_OECONF_append_powerpc = " --with-long-double-128"
> -EXTRA_OECONF_append_powerpc64 = " --with-long-double-128"
> -
>   SYSTEMHEADERS = "${target_includedir}"
>   SYSTEMLIBS = "${target_base_libdir}/"
>   SYSTEMLIBS1 = "${target_libdir}/"



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

end of thread, other threads:[~2014-08-14 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14  7:51 [PATCH 1/3] gcc: Abstract long double configuration into python function Khem Raj
2014-08-14  7:51 ` [PATCH 2/3] gcc-cross-initial: Put limits.h in gccdir/include Khem Raj
2014-08-14  7:51 ` [PATCH 3/3] python: Fix build on musl Khem Raj
2014-08-14 10:13 ` [PATCH 1/3] gcc: Abstract long double configuration into python function Peter A. Bigot

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.