summaryrefslogtreecommitdiffstats
path: root/external/meta-gplv2/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-gplv2/recipes-devtools')
-rw-r--r--external/meta-gplv2/recipes-devtools/bison/bison/bison-2.3_m4.patch121
-rw-r--r--external/meta-gplv2/recipes-devtools/dosfstools/dosfstools/fixing-out-of-bound-writes.patch54
-rw-r--r--external/meta-gplv2/recipes-devtools/dosfstools/dosfstools_2.11.bb1
-rw-r--r--external/meta-gplv2/recipes-devtools/elfutils/elfutils_0.148.bb4
4 files changed, 120 insertions, 60 deletions
diff --git a/external/meta-gplv2/recipes-devtools/bison/bison/bison-2.3_m4.patch b/external/meta-gplv2/recipes-devtools/bison/bison/bison-2.3_m4.patch
index 348ce1d2..626bc42c 100644
--- a/external/meta-gplv2/recipes-devtools/bison/bison/bison-2.3_m4.patch
+++ b/external/meta-gplv2/recipes-devtools/bison/bison/bison-2.3_m4.patch
@@ -76,34 +76,35 @@ Upstream-Status: Pending
+])
--- /dev/null
+++ bison-1.875/m4/uintmax_t.m4
-@@ -0,0 +1,29 @@
-+# uintmax_t.m4 serial 6 (gettext-0.11)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
+@@ -0,0 +1,30 @@
++# uintmax_t.m4 serial 12 (gettext-0.20.1)
++dnl Copyright (C) 1997-2004, 2007-2019 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
-+AC_PREREQ(2.13)
++AC_PREREQ([2.13])
+
-+# Define uintmax_t to `unsigned long' or `unsigned long long'
-+# if <inttypes.h> does not exist.
++# Define uintmax_t to 'unsigned long' or 'unsigned long long'
++# if it is not already defined in <stdint.h> or <inttypes.h>.
+
-+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
++AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
-+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
-+ test $ac_cv_type_unsigned_long_long = yes \
++ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
++ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
++ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
++ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
++ test $ac_cv_type_unsigned_long_long_int = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
-+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-+ [Define to unsigned long or unsigned long long
-+ if <inttypes.h> and <stdint.h> don't define.])
++ AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
++ [Define to unsigned long or unsigned long long
++ if <stdint.h> and <inttypes.h> don't define.])
++ else
++ AC_DEFINE([HAVE_UINTMAX_T], [1],
++ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
--- /dev/null
@@ -143,64 +144,64 @@ Upstream-Status: Pending
+)
--- /dev/null
+++ bison-1.875/m4/stdint_h.m4
-@@ -0,0 +1,28 @@
-+# stdint_h.m4 serial 2 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
+@@ -0,0 +1,27 @@
++# stdint_h.m4 serial 9 (gettext-0.20.1)
++dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
-+AC_DEFUN([jm_AC_HEADER_STDINT_H],
++AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
-+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
-+ [AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <stdint.h>],
-+ [uintmax_t i = (uintmax_t) -1;],
-+ jm_ac_cv_header_stdint_h=yes,
-+ jm_ac_cv_header_stdint_h=no)])
-+ if test $jm_ac_cv_header_stdint_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
-+[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
++ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <sys/types.h>
++ #include <stdint.h>]],
++ [[uintmax_t i = (uintmax_t) -1; return !i;]])],
++ [gl_cv_header_stdint_h=yes],
++ [gl_cv_header_stdint_h=no])])
++ if test $gl_cv_header_stdint_h = yes; then
++ AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
++ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
++ and declares uintmax_t. ])
+ fi
+])
--- /dev/null
+++ bison-1.875/m4/inttypes_h.m4
-@@ -0,0 +1,28 @@
-+# inttypes_h.m4 serial 4 (gettext-0.11.4)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
+@@ -0,0 +1,29 @@
++# inttypes_h.m4 serial 10 (gettext-0.20.1)
++dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
-+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
++AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
-+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
-+ [AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <inttypes.h>],
-+ [uintmax_t i = (uintmax_t) -1;],
-+ jm_ac_cv_header_inttypes_h=yes,
-+ jm_ac_cv_header_inttypes_h=no)])
-+ if test $jm_ac_cv_header_inttypes_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
-+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
++ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[
++#include <sys/types.h>
++#include <inttypes.h>
++ ]],
++ [[uintmax_t i = (uintmax_t) -1; return !i;]])],
++ [gl_cv_header_inttypes_h=yes],
++ [gl_cv_header_inttypes_h=no])])
++ if test $gl_cv_header_inttypes_h = yes; then
++ AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
++ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
++ and declares uintmax_t. ])
+ fi
+])
--- /dev/null
diff --git a/external/meta-gplv2/recipes-devtools/dosfstools/dosfstools/fixing-out-of-bound-writes.patch b/external/meta-gplv2/recipes-devtools/dosfstools/dosfstools/fixing-out-of-bound-writes.patch
new file mode 100644
index 00000000..f80f5abc
--- /dev/null
+++ b/external/meta-gplv2/recipes-devtools/dosfstools/dosfstools/fixing-out-of-bound-writes.patch
@@ -0,0 +1,54 @@
+Fix out of bound write issues where sprintf writes across both
+name and ext fields and drops the final null ternimator outside the struct
+
+Upstream-Status: Inappropriate [licensing]
+We're tracking an old release of dosfstools due to licensing issues.
+
+diff --git a/dosfsck/check.c b/dosfsck/check.c
+index e8c13bb..91177d3 100644
+--- a/dosfsck/check.c
++++ b/dosfsck/check.c
+@@ -58,6 +58,13 @@ static DOS_FILE *root;
+ } \
+ } while(0)
+
++static void de_printf(DIR_ENT *de, const char *pattern, int curr_num)
++{
++ char buffer[12];
++ sprintf(buffer, pattern, curr_num);
++ memcpy(de->name, buffer, 8);
++ memcpy(de->ext, buffer + 8, 3);
++}
+
+ loff_t alloc_rootdir_entry(DOS_FS *fs, DIR_ENT *de, const char *pattern)
+ {
+@@ -110,7 +117,8 @@ loff_t alloc_rootdir_entry(DOS_FS *fs, DIR_ENT *de, const char *pattern)
+ }
+ memset(de,0,sizeof(DIR_ENT));
+ while (1) {
+- sprintf(de->name,pattern,curr_num);
++ de_printf(de, pattern, curr_num);
++
+ clu_num = fs->root_cluster;
+ i = 0;
+ offset2 = cluster_start(fs,clu_num);
+@@ -150,7 +158,7 @@ loff_t alloc_rootdir_entry(DOS_FS *fs, DIR_ENT *de, const char *pattern)
+ offset = fs->root_start+next_free*sizeof(DIR_ENT);
+ memset(de,0,sizeof(DIR_ENT));
+ while (1) {
+- sprintf(de->name,pattern,curr_num);
++ de_printf(de, pattern, curr_num);
+ for (scan = 0; scan < fs->root_entries; scan++)
+ if (scan != next_free &&
+ !strncmp(root[scan].name,de->name,MSDOS_NAME))
+@@ -311,8 +319,8 @@ static void auto_rename(DOS_FILE *file)
+ first = file->parent ? file->parent->first : root;
+ number = 0;
+ while (1) {
+- sprintf(file->dir_ent.name,"FSCK%04d",number);
+- strncpy(file->dir_ent.ext,"REN",3);
++ de_printf(&file->dir_ent, "FSCK%04dREN", number);
++
+ for (walk = first; walk; walk = walk->next)
+ if (walk != file && !strncmp(walk->dir_ent.name,file->dir_ent.
+ name,MSDOS_NAME)) break;
diff --git a/external/meta-gplv2/recipes-devtools/dosfstools/dosfstools_2.11.bb b/external/meta-gplv2/recipes-devtools/dosfstools/dosfstools_2.11.bb
index dd543b16..37c21810 100644
--- a/external/meta-gplv2/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/external/meta-gplv2/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -19,6 +19,7 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d4
file://nofat32_autoselect.patch \
file://fix_populated_dosfs_creation.patch \
file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
+ file://fixing-out-of-bound-writes.patch \
"
SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
diff --git a/external/meta-gplv2/recipes-devtools/elfutils/elfutils_0.148.bb b/external/meta-gplv2/recipes-devtools/elfutils/elfutils_0.148.bb
index a03b74e9..1f07a285 100644
--- a/external/meta-gplv2/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/external/meta-gplv2/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -57,6 +57,10 @@ SRC_URI += "\
"
inherit autotools gettext
+# There is a fix in 0.175 version (https://sourceware.org/bugzilla/show_bug.cgi?id=23884)
+# but 0.175 has different license, so to be safe don't backport the fix, just ignore the issue
+CFLAGS += "-Wno-error=missing-attributes"
+
EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
EXTRA_OECONF_append_class-native = " --without-bzlib"
EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"