Skip to content

Commit

Permalink
gnumake: Unconditionally fix build against glibc-2.27
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Mar 16, 2018
1 parent 1c30c8d commit 519f0b8
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 129 deletions.
2 changes: 2 additions & 0 deletions pkgs/development/tools/build-managers/gnumake/4.2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ stdenv.mkDerivation {
# included Makefiles, don't look in /usr/include and friends.
./impure-dirs.patch
./pselect.patch
# Fix support for glibc 2.27's glob, inspired by http://www.linuxfromscratch.org/lfs/view/8.2/chapter05/make.html
./glibc-2.27-glob.patch
];

nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff -Naur glob/glob.c glob/glob.c
--- glob/glob.c 2013-10-20 13:14:38.000000000 -0400
+++ glob/glob.c 2018-03-16 14:32:38.483496170 -0400
@@ -208,28 +208,9 @@
#endif /* __GNU_LIBRARY__ || __DJGPP__ */


-#if !defined __alloca && !defined __GNU_LIBRARY__
-
-# ifdef __GNUC__
-# undef alloca
-# define alloca(n) __builtin_alloca (n)
-# else /* Not GCC. */
-# ifdef HAVE_ALLOCA_H
# include <alloca.h>
-# else /* Not HAVE_ALLOCA_H. */
-# ifndef _AIX
-# ifdef WINDOWS32
-# include <malloc.h>
-# else
-extern char *alloca ();
-# endif /* WINDOWS32 */
-# endif /* Not _AIX. */
-# endif /* sparc or HAVE_ALLOCA_H. */
-# endif /* GCC. */
-
# define __alloca alloca

-#endif

#ifndef __GNU_LIBRARY__
# define __stat stat
24 changes: 0 additions & 24 deletions pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27.patch

This file was deleted.

69 changes: 0 additions & 69 deletions pkgs/development/tools/build-managers/gnumake/4.2/head.nix

This file was deleted.

This file was deleted.

6 changes: 1 addition & 5 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7758,11 +7758,7 @@ with pkgs;

gnumake382 = callPackage ../development/tools/build-managers/gnumake/3.82 { };
gnumake3 = gnumake382;
gnumake42 = callPackage ../development/tools/build-managers/gnumake/4.2 { };
gnumake = if hostPlatform.isRiscV # Technically this check should be for glibc version.
then gnumake42HEAD
else gnumake42;
gnumake42HEAD = callPackage ../development/tools/build-managers/gnumake/4.2/head.nix { };
gnumake = callPackage ../development/tools/build-managers/gnumake/4.2 { };

gnustep = recurseIntoAttrs (callPackage ../desktops/gnustep {});

Expand Down

0 comments on commit 519f0b8

Please sign in to comment.