syslinux/syslinux-4.04-gcc10.diff

89 lines
2.4 KiB
Diff
Raw Normal View History

--- com32/MCONFIG 2011-04-18 23:24:17.000000000 +0200
+++ com32/MCONFIG 2020-03-18 17:05:57.507347671 +0100
@@ -18,6 +18,7 @@
include $(topdir)/MCONFIG
GCCOPT := $(call gcc_ok,-std=gnu99,)
+GCCOPT += $(call gcc_ok,-fcommon,)
GCCOPT += $(call gcc_ok,-m32,)
GCCOPT += $(call gcc_ok,-fno-stack-protector,)
GCCOPT += $(call gcc_ok,-fwrapv,)
--- com32/lib/MCONFIG 2011-04-18 23:24:17.000000000 +0200
+++ com32/lib/MCONFIG 2020-03-18 17:07:39.960337684 +0100
@@ -3,6 +3,7 @@
include $(topdir)/MCONFIG
GCCOPT := $(call gcc_ok,-std=gnu99,)
+GCCOPT += $(call gcc_ok,-fcommon,)
GCCOPT += $(call gcc_ok,-m32,)
GCCOPT += $(call gcc_ok,-fno-stack-protector,)
GCCOPT += $(call gcc_ok,-fwrapv,)
--- dos/errno.h 2011-04-18 23:24:17.000000000 +0200
+++ dos/errno.h 2020-03-18 17:12:17.359044057 +0100
@@ -36,7 +36,7 @@
#define EDOM 33 /* Math argument out of domain of func */
#define ERANGE 34 /* Math result not representable */
-int errno;
+int errno __attribute__ ((common));
void perror(const char *);
#endif /* ERRNO_H */
--- gpxe/src/core/exec.c 2011-04-18 23:24:17.000000000 +0200
+++ gpxe/src/core/exec.c 2020-03-18 16:56:52.257888015 +0100
@@ -38,8 +38,8 @@
*/
/* Avoid dragging in getopt.o unless a command really uses it */
-int optind;
-int nextchar;
+extern int optind;
+extern int nextchar;
/**
* Execute command
--- gpxe/src/include/compiler.h 2011-04-18 23:24:17.000000000 +0200
+++ gpxe/src/include/compiler.h 2020-03-18 16:48:56.193236495 +0100
@@ -64,7 +64,7 @@
.comm _sym, 0
#else /* ASSEMBLY */
#define PROVIDE_SYMBOL( _sym ) \
- char _sym[0]
+ char _sym[0] __attribute__ ((common))
#endif /* ASSEMBLY */
/** Require a symbol within this object file
--- dos/string.h 2020-03-18 17:25:50.019155261 +0100
+++ dos/string.h 2020-03-19 15:10:36.310787373 +0100
@@ -5,12 +5,13 @@
#ifndef _STRING_H
#define _STRING_H
+#include <stdlib.h>
+
/* Standard routines */
#define memcpy(a,b,c) __builtin_memcpy(a,b,c)
#define memmove(a,b,c) __builtin_memmove(a,b,c)
#define memset(a,b,c) __builtin_memset(a,b,c)
#define strcpy(a,b) __builtin_strcpy(a,b)
-#define strlen(a) __builtin_strlen(a)
/* This only returns true or false */
static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n)
@@ -21,6 +22,15 @@
return rv;
}
+static inline size_t strlen(const char *s)
+{
+ size_t len = 0;
+
+ while(*s++) len++;
+
+ return len;
+}
+
extern char *strchr(const char *s, int c);
#endif /* _STRING_H */