diff -Nru cpu2006/tools/src/specsum/gnulib/stdio.in.h.orig cpu2006/tools/src/specsum/gnulib/stdio.in.h
--- cpu2006/tools/src/specsum/gnulib/stdio.in.h.orig	2011-03-03 22:29:36.000000000 +0000
+++ cpu2006/tools/src/specsum/gnulib/stdio.in.h	2023-06-18 21:05:17.330795402 +0000
@@ -159,7 +159,7 @@
    so any use of gets warrants an unconditional warning.  Assume it is
    always declared, since it is required by C89.  */
 #undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+// _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 
 #if @GNULIB_FOPEN@
 # if @REPLACE_FOPEN@
diff -Nru cpu2006/tools/src/tar-1.25/gnu/stdio.in.h.orig cpu2006/tools/src/tar-1.25/gnu/stdio.in.h
--- cpu2006/tools/src/tar-1.25/gnu/stdio.in.h.orig	2011-03-03 22:29:36.000000000 +0000
+++ cpu2006/tools/src/tar-1.25/gnu/stdio.in.h	2023-06-18 20:39:10.197945816 +0000
@@ -144,7 +144,7 @@
    so any use of gets warrants an unconditional warning.  Assume it is
    always declared, since it is required by C89.  */
 #undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+// _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 
 #if @GNULIB_FOPEN@
 # if @REPLACE_FOPEN@
diff -Nru cpu2006/tools/src/make-3.82/glob/glob.c.orig cpu2006/tools/src/make-3.82/glob/glob.c
--- cpu2006/tools/src/make-3.82/glob/glob.c.orig	2011-03-03 22:29:36.000000000 +0000
+++ cpu2006/tools/src/make-3.82/glob/glob.c	2023-06-18 20:39:10.205945891 +0000
@@ -208,7 +208,7 @@
 #endif /* __GNU_LIBRARY__ || __DJGPP__ */
 
 
-#if !defined __alloca && !defined __GNU_LIBRARY__
+#if !defined __alloca && defined __GNU_LIBRARY__
 
 # ifdef	__GNUC__
 #  undef alloca
@@ -231,7 +231,7 @@
 
 #endif
 
-#ifndef __GNU_LIBRARY__
+#ifdef __GNU_LIBRARY__
 # define __stat stat
 # ifdef STAT_MACROS_BROKEN
 #  undef S_ISDIR
diff -Nru cpu2006/tools/src/make-3.82/make.h.orig cpu2006/tools/src/make-3.82/make.h
--- cpu2006/tools/src/make-3.82/make.h.orig	2011-03-03 22:29:36.000000000 +0000
+++ cpu2006/tools/src/make-3.82/make.h	2023-06-18 20:39:10.205945891 +0000
@@ -344,7 +344,7 @@
 #endif
 #ifdef SET_STACK_SIZE
 # include <sys/resource.h>
-struct rlimit stack_limit;
+extern struct rlimit stack_limit;
 #endif
 
 struct floc
diff -Nru cpu2006/tools/src/TimeDate-1.20/t/getdate.t.orig cpu2006/tools/src/TimeDate-1.20/t/getdate.t
--- cpu2006/tools/src/TimeDate-1.20/t/getdate.t.orig	2011-03-03 22:29:36.000000000 +0000
+++ cpu2006/tools/src/TimeDate-1.20/t/getdate.t	2023-06-18 20:39:10.201945854 +0000
@@ -156,7 +156,7 @@
 !;
 
 require Time::Local;
-my $offset = Time::Local::timegm(0,0,0,1,0,70);
+my $offset = Time::Local::timegm(0,0,0,1,0,1970);
 
 @data = split(/\n/, $data);
 
diff -Nru cpu2006/tools/src/buildtools.orig cpu2006/tools/src/buildtools
--- cpu2006/tools/src/buildtools.orig	2011-04-08 20:41:02.000000000 +0000
+++ cpu2006/tools/src/buildtools	2023-06-18 20:39:10.209945928 +0000
@@ -355,7 +355,7 @@
     LD_LIBRARY_PATH=`pwd`
     DYLD_LIBRARY_PATH=`pwd`
     export LD_LIBRARY_PATH DYLD_LIBRARY_PATH
-    ./Configure -dOes -Ud_flock $PERLFLAGS -Ddosuid=undef -Dprefix=$INSTALLDIR -Dd_bincompat3=undef -A ldflags=-L${INSTALLDIR}/lib -A ccflags=-I${INSTALLDIR}/include -Ui_db -Ui_gdbm -Ui_ndbm -Ui_dbm -Uuse5005threads ; testordie "error configuring perl"
+    ./Configure -dOes -Ud_flock $PERLFLAGS -Ddosuid=undef -Dprefix=$INSTALLDIR -Dd_bincompat3=undef -A ldflags="-L${INSTALLDIR}/lib" -A ccflags="-I${INSTALLDIR}/include -std=gnu89 -O2 -fno-strict-aliasing -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-stack-protector -fno-tree-vectorize" -Ui_db -Ui_gdbm -Ui_ndbm -Ui_dbm -Uuse5005threads -Dlibs="-lm -ldl" -Dcccdlflags="-fPIC -shared" -Dlddlflags="-shared -fPIC" -Duseshrplib=true -Duse64bitall; testordie "error configuring perl"
     $MYMAKE; testordie "error building Perl"
     ./perl installperl; testordie "error installing Perl"
     setspecperllib
