Switch to gcc v7.5.0.

This commit is contained in:
sorgelig
2021-02-01 16:27:22 +08:00
parent 140019796d
commit bfc5c652d1
6 changed files with 14 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
# makefile to fail if any command in pipe is failed.
SHELL = /bin/bash -o pipefail
# using gcc version 5.4.1 20161213 (Linaro GCC 5.4-2017.01-rc2)
# using gcc version 7.5.0 (Linaro GCC 7.5-2019.12)
BASE = arm-linux-gnueabihf
CC = $(BASE)-gcc
@@ -46,7 +46,7 @@ OBJ = $(C_SRC:.c=.c.o) $(CPP_SRC:.cpp=.cpp.o) $(IMG:.png=.png.o)
DEP = $(C_SRC:.c=.c.d) $(CPP_SRC:.cpp=.cpp.d)
DFLAGS = $(INCLUDE) -D_7ZIP_ST -DPACKAGE_VERSION=\"1.3.3\" -DFLAC_API_EXPORTS -DFLAC__HAS_OGG=0 -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -DENABLE_64_BIT_WORDS=0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\"
CFLAGS = $(DFLAGS) -Wall -Wextra -Wno-strict-aliasing -c -O3
CFLAGS = $(DFLAGS) -Wall -Wextra -Wno-strict-aliasing -Wno-format-truncation -Wno-psabi -c -O3
LFLAGS = -lc -lstdc++ -lm -lrt $(IMLIB2_LIB)
$(PRJ): $(OBJ)

View File

@@ -30,7 +30,7 @@
<NMakeOutput>MiSTer</NMakeOutput>
<NMakeCleanCommandLine>git.lnk ./clean.sh</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>__arm__;__GNUC__;__USE_GNU ;_GNU_SOURCE;VDATE="000000";_FILE_OFFSET_BITS=64;_LARGEFILE64_SOURCE;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\libc\usr\include;c:\Work\Git\opt\gcc54\lib\gcc\arm-linux-gnueabihf\5.4.1\include;c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\include\c++\5.4.1;c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\include\c++\5.4.1\arm-linux-gnueabihf;$(NMakeIncludeSearchPath);lib\libco;lib\miniz;lib\lodepng</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>c:\Work\Git\opt\gcc75\arm-linux-gnueabihf\libc\usr\include;c:\Work\Git\opt\gcc75\lib\gcc\arm-linux-gnueabihf\7.5.0\include;c:\Work\Git\opt\gcc75\arm-linux-gnueabihf\include\c++\7.5.0;c:\Work\Git\opt\gcc75\arm-linux-gnueabihf\include\c++\7.5.0\arm-linux-gnueabihf;$(NMakeIncludeSearchPath);lib\libco;lib\miniz;lib\lodepng</NMakeIncludeSearchPath>
<OutDir>$(TEMP)</OutDir>
<IntDir>$(TEMP)</IntDir>
<AdditionalOptions>

View File

@@ -78,7 +78,7 @@ static inline void *safe_calloc_(size_t nmemb, size_t size)
{
if(!nmemb || !size)
return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always allocate */
return calloc(nmemb, size);
return (nmemb <= INT_MAX) ? calloc(nmemb, size) : NULL;
}
/*@@@@ there's probably a better way to prevent overflows when allocating untrusted sums but this works for now */

View File

@@ -1272,6 +1272,8 @@ static chd_error decompress_v5_map(chd_file* chd, chd_header* header)
/* pseudo-types; convert into base types */
case COMPRESSION_SELF_1:
last_self++;
// fall through
case COMPRESSION_SELF_0:
rawmap[0] = COMPRESSION_SELF;
offset = last_self;
@@ -1284,6 +1286,8 @@ static chd_error decompress_v5_map(chd_file* chd, chd_header* header)
case COMPRESSION_PARENT_1:
last_parent += header->hunkbytes / header->unitbytes;
// fall through
case COMPRESSION_PARENT_0:
rawmap[0] = COMPRESSION_PARENT;
offset = last_parent;

View File

@@ -5525,6 +5525,7 @@ void HandleUI(void)
while(m < OsdGetSize()-1) OsdWrite(m++, "");
OsdWrite(15, STD_EXIT, menusub == 5);
menustate = MENU_SYSTEM2;
break;
case MENU_SYSTEM2:
if (menu)

View File

@@ -728,13 +728,13 @@ static int xml_send_rom(XMLEvent evt, const XMLNode* node, SXML_CHAR* text, cons
* the buffer_append is part of a buffer library that will realloc automatically
*/
{
int result = buffer_append(arc_info->data, text);
if (result<0)
printf("buffer_append failed %d\n",result);
int result = buffer_append(arc_info->data, text);
if (result<0)
printf("buffer_append failed %d\n",result);
if (result==-1)
printf("-1 no data given\n");
printf("-1 no data given\n");
if (result==-2)
printf("-2 could not allocate\n");
printf("-2 could not allocate\n");
}
//printf("XML_EVENT_TEXT: text [%s]\n",text);
break;