* [PATCH] Always use locale.h in grep
@ 2013-03-11 15:19 Alex DAMIAN
2013-03-11 15:26 ` [[Patch v2]] " Alex DAMIAN
0 siblings, 1 reply; 3+ messages in thread
From: Alex DAMIAN @ 2013-03-11 15:19 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
The changes in the grep 2.5 configuration always leave out
HAVE_LOCALE_H - it has been removed from other files, but
not from everywhere.
This leads to a crash in certain configurations where the
size of int is not the size of pointer due to using
setlocale() while being undeclared.
[YOCTO #3959]
---
.../grep/grep-2.5.1a/fix64-int-to-pointer.patch | 17 +++++++++++++++++
meta/recipes-extended/grep/grep_2.5.1a.bb | 3 ++-
2 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
new file mode 100644
index 0000000..3b91520
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
@@ -0,0 +1,17 @@
+Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
+Upstream-Status: Inappropriate [ old version that will not be maintained ]
+Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
+
+diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
+--- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200
++++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200
+@@ -38,9 +38,7 @@
+ # endif
+ #endif
+
+-#if HAVE_LOCALE_H
+ # include <locale.h>
+-#endif
+
+ #if HAVE_STRING_H
+ # include <string.h>
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
index ebcbe23..b534066 100644
--- a/meta/recipes-extended/grep/grep_2.5.1a.bb
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
file://uclibc-fix.patch \
file://grep_fix_for_automake-1.12.patch \
file://gettext.patch \
+ file://fix64-int-to-pointer.patch \
file://Makevars \
"
@@ -21,7 +22,7 @@ inherit autotools gettext
EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
-CFLAGS += "-D PROTOTYPES"
+CFLAGS += "-O0 -D PROTOTYPES"
do_configure_prepend () {
rm -f ${S}/m4/init.m4
cp -f ${WORKDIR}/Makevars ${S}/po/
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* [[Patch v2]] Always use locale.h in grep
2013-03-11 15:19 [PATCH] Always use locale.h in grep Alex DAMIAN
@ 2013-03-11 15:26 ` Alex DAMIAN
2013-03-11 21:22 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: Alex DAMIAN @ 2013-03-11 15:26 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
The changes in the grep 2.5 configuration always leave out
HAVE_LOCALE_H - it has been removed from other files, but
not from everywhere.
This leads to a crash in certain configurations where the
size of int is not the size of pointer due to using
setlocale() while being undeclared.
[YOCTO #3959]
---
.../grep/grep-2.5.1a/fix64-int-to-pointer.patch | 17 +++++++++++++++++
meta/recipes-extended/grep/grep_2.5.1a.bb | 3 ++-
2 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
new file mode 100644
index 0000000..3b91520
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
@@ -0,0 +1,17 @@
+Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
+Upstream-Status: Inappropriate [ old version that will not be maintained ]
+Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
+
+diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
+--- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200
++++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200
+@@ -38,9 +38,7 @@
+ # endif
+ #endif
+
+-#if HAVE_LOCALE_H
+ # include <locale.h>
+-#endif
+
+ #if HAVE_STRING_H
+ # include <string.h>
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
index ebcbe23..b534066 100644
--- a/meta/recipes-extended/grep/grep_2.5.1a.bb
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
file://uclibc-fix.patch \
file://grep_fix_for_automake-1.12.patch \
file://gettext.patch \
+ file://fix64-int-to-pointer.patch \
file://Makevars \
"
@@ -21,7 +22,7 @@ inherit autotools gettext
EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
-CFLAGS += "-D PROTOTYPES"
+CFLAGS += "-O0 -D PROTOTYPES"
do_configure_prepend () {
rm -f ${S}/m4/init.m4
cp -f ${WORKDIR}/Makevars ${S}/po/
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [[Patch v2]] Always use locale.h in grep
2013-03-11 15:26 ` [[Patch v2]] " Alex DAMIAN
@ 2013-03-11 21:22 ` Saul Wold
0 siblings, 0 replies; 3+ messages in thread
From: Saul Wold @ 2013-03-11 21:22 UTC (permalink / raw)
To: Alex DAMIAN; +Cc: openembedded-core
Please fix the subject to reflect which recipe you are affecting.
grep: Always use locale.h
(see below also)
On 03/11/2013 08:26 AM, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
>
> The changes in the grep 2.5 configuration always leave out
> HAVE_LOCALE_H - it has been removed from other files, but
> not from everywhere.
>
> This leads to a crash in certain configurations where the
> size of int is not the size of pointer due to using
> setlocale() while being undeclared.
>
Nice pickup on fixing this bug!
> [YOCTO #3959]
> ---
> .../grep/grep-2.5.1a/fix64-int-to-pointer.patch | 17 +++++++++++++++++
> meta/recipes-extended/grep/grep_2.5.1a.bb | 3 ++-
> 2 files changed, 19 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
>
> diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
> new file mode 100644
> index 0000000..3b91520
> --- /dev/null
> +++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
> @@ -0,0 +1,17 @@
> +Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
> +Upstream-Status: Inappropriate [ old version that will not be maintained ]
> +Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
> +
> +diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
> +--- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200
> ++++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200
> +@@ -38,9 +38,7 @@
> + # endif
> + #endif
> +
> +-#if HAVE_LOCALE_H
> + # include <locale.h>
> +-#endif
> +
> + #if HAVE_STRING_H
> + # include <string.h>
> diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
> index ebcbe23..b534066 100644
> --- a/meta/recipes-extended/grep/grep_2.5.1a.bb
> +++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
> @@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
> file://uclibc-fix.patch \
> file://grep_fix_for_automake-1.12.patch \
> file://gettext.patch \
> + file://fix64-int-to-pointer.patch \
> file://Makevars \
> "
>
> @@ -21,7 +22,7 @@ inherit autotools gettext
>
> EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
>
> -CFLAGS += "-D PROTOTYPES"
> +CFLAGS += "-O0 -D PROTOTYPES"
You are also changing the CFLAGS here, does this need to be removed or
documented.
Sau!
> do_configure_prepend () {
> rm -f ${S}/m4/init.m4
> cp -f ${WORKDIR}/Makevars ${S}/po/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-11 21:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 15:19 [PATCH] Always use locale.h in grep Alex DAMIAN
2013-03-11 15:26 ` [[Patch v2]] " Alex DAMIAN
2013-03-11 21:22 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox