forked from pool/kbuild
Accepting request 578304 from Virtualization
- add use-alloca.patch (bsc#1079838) OBS-URL: https://build.opensuse.org/request/show/578304 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/kbuild?expand=0&rev=36
This commit is contained in:
parent
c3b73455b9
commit
f0f78bb736
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 10:01:52 UTC 2018 - dmueller@suse.com
|
||||
|
||||
- add use-alloca.patch (bsc#1079838)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 22 00:43:39 UTC 2017 - Larry.Finger@lwfinger.net
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package kbuild
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -42,6 +42,7 @@ Patch8: kbuild-wrong-memset.patch
|
||||
Patch9: ppc64le.patch
|
||||
Patch10: aarch64.patch
|
||||
Patch11: kbuild-gcc7.patch
|
||||
Patch12: use-alloca.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -69,6 +70,7 @@ The goals of the kBuild framework:
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
|
148
use-alloca.patch
Normal file
148
use-alloca.patch
Normal file
@ -0,0 +1,148 @@
|
||||
--- src/kmk/glob/glob.c.orig 2018-02-20 10:56:04.477559710 +0100
|
||||
+++ src/kmk/glob/glob.c 2018-02-20 10:56:51.498370508 +0100
|
||||
@@ -209,8 +209,7 @@
|
||||
#endif /* __GNU_LIBRARY__ || __DJGPP__ */
|
||||
|
||||
|
||||
-#if !defined __alloca && !defined __GNU_LIBRARY__
|
||||
-
|
||||
+#if !defined alloca
|
||||
# ifdef __GNUC__
|
||||
# undef alloca
|
||||
# define alloca(n) __builtin_alloca (n)
|
||||
@@ -227,9 +226,6 @@
|
||||
# endif /* Not _AIX. */
|
||||
# endif /* sparc or HAVE_ALLOCA_H. */
|
||||
# endif /* GCC. */
|
||||
-
|
||||
-# define __alloca alloca
|
||||
-
|
||||
#endif
|
||||
|
||||
#ifndef __GNU_LIBRARY__
|
||||
@@ -558,7 +554,7 @@
|
||||
char *drive_spec;
|
||||
|
||||
++dirlen;
|
||||
- drive_spec = (char *) __alloca (dirlen + 1);
|
||||
+ drive_spec = (char *) alloca (dirlen + 1);
|
||||
#ifdef HAVE_MEMPCPY
|
||||
*((char *) mempcpy (drive_spec, pattern, dirlen)) = '\0';
|
||||
#else
|
||||
@@ -574,7 +570,7 @@
|
||||
from "d:/", since "d:" and "d:/" are not the same.*/
|
||||
}
|
||||
#endif
|
||||
- newp = (char *) __alloca (dirlen + 1);
|
||||
+ newp = (char *) alloca (dirlen + 1);
|
||||
#ifdef HAVE_MEMPCPY
|
||||
*((char *) mempcpy (newp, pattern, dirlen)) = '\0';
|
||||
#else
|
||||
@@ -645,7 +641,7 @@
|
||||
/* `sysconf' does not support _SC_LOGIN_NAME_MAX. Try
|
||||
a moderate value. */
|
||||
buflen = 20;
|
||||
- name = (char *) __alloca (buflen);
|
||||
+ name = (char *) alloca (buflen);
|
||||
|
||||
success = getlogin_r (name, buflen) >= 0;
|
||||
# else
|
||||
@@ -664,7 +660,7 @@
|
||||
/* `sysconf' does not support _SC_GETPW_R_SIZE_MAX.
|
||||
Try a moderate value. */
|
||||
pwbuflen = 1024;
|
||||
- pwtmpbuf = (char *) __alloca (pwbuflen);
|
||||
+ pwtmpbuf = (char *) alloca (pwbuflen);
|
||||
|
||||
while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p)
|
||||
!= 0)
|
||||
@@ -675,7 +671,7 @@
|
||||
break;
|
||||
}
|
||||
pwbuflen *= 2;
|
||||
- pwtmpbuf = (char *) __alloca (pwbuflen);
|
||||
+ pwtmpbuf = (char *) alloca (pwbuflen);
|
||||
__set_errno (save);
|
||||
}
|
||||
# else
|
||||
@@ -702,7 +698,7 @@
|
||||
{
|
||||
char *newp;
|
||||
size_t home_len = strlen (home_dir);
|
||||
- newp = (char *) __alloca (home_len + dirlen);
|
||||
+ newp = (char *) alloca (home_len + dirlen);
|
||||
# ifdef HAVE_MEMPCPY
|
||||
mempcpy (mempcpy (newp, home_dir, home_len),
|
||||
&dirname[1], dirlen);
|
||||
@@ -725,7 +721,7 @@
|
||||
else
|
||||
{
|
||||
char *newp;
|
||||
- newp = (char *) __alloca (end_name - dirname);
|
||||
+ newp = (char *) alloca (end_name - dirname);
|
||||
# ifdef HAVE_MEMPCPY
|
||||
*((char *) mempcpy (newp, dirname + 1, end_name - dirname))
|
||||
= '\0';
|
||||
@@ -749,7 +745,7 @@
|
||||
/* `sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a
|
||||
moderate value. */
|
||||
buflen = 1024;
|
||||
- pwtmpbuf = (char *) __alloca (buflen);
|
||||
+ pwtmpbuf = (char *) alloca (buflen);
|
||||
|
||||
while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0)
|
||||
{
|
||||
@@ -759,7 +755,7 @@
|
||||
break;
|
||||
}
|
||||
buflen *= 2;
|
||||
- pwtmpbuf = __alloca (buflen);
|
||||
+ pwtmpbuf = alloca (buflen);
|
||||
__set_errno (save);
|
||||
}
|
||||
# else
|
||||
@@ -776,7 +772,7 @@
|
||||
char *newp;
|
||||
size_t home_len = strlen (home_dir);
|
||||
size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
|
||||
- newp = (char *) __alloca (home_len + rest_len + 1);
|
||||
+ newp = (char *) alloca (home_len + rest_len + 1);
|
||||
# ifdef HAVE_MEMPCPY
|
||||
*((char *) mempcpy (mempcpy (newp, home_dir, home_len),
|
||||
end_name, rest_len)) = '\0';
|
||||
@@ -1268,7 +1264,7 @@
|
||||
struct stat st;
|
||||
size_t patlen = strlen (pattern);
|
||||
size_t dirlen = strlen (directory);
|
||||
- char *fullname = (char *) __alloca (dirlen + 1 + patlen + 1);
|
||||
+ char *fullname = (char *) alloca (dirlen + 1 + patlen + 1);
|
||||
|
||||
# ifdef HAVE_MEMPCPY
|
||||
mempcpy (mempcpy (mempcpy (fullname, directory, dirlen),
|
||||
@@ -1299,7 +1295,7 @@
|
||||
{
|
||||
/* This is a special case for matching directories like in
|
||||
"*a/". */
|
||||
- names = (struct globlink *) __alloca (sizeof (struct globlink));
|
||||
+ names = (struct globlink *) alloca (sizeof (struct globlink));
|
||||
names->name = (char *) malloc (1);
|
||||
if (names->name == NULL)
|
||||
goto memory_error;
|
||||
@@ -1358,7 +1354,7 @@
|
||||
if (fnmatch (pattern, name, fnm_flags) == 0)
|
||||
{
|
||||
struct globlink *new = (struct globlink *)
|
||||
- __alloca (sizeof (struct globlink));
|
||||
+ alloca (sizeof (struct globlink));
|
||||
len = NAMLEN (d);
|
||||
new->name = (char *) malloc (len + 1);
|
||||
if (new->name == NULL)
|
||||
@@ -1383,7 +1379,7 @@
|
||||
{
|
||||
size_t len = strlen (pattern);
|
||||
nfound = 1;
|
||||
- names = (struct globlink *) __alloca (sizeof (struct globlink));
|
||||
+ names = (struct globlink *) alloca (sizeof (struct globlink));
|
||||
names->next = NULL;
|
||||
names->name = (char *) malloc (len + 1);
|
||||
if (names->name == NULL)
|
Loading…
x
Reference in New Issue
Block a user