Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIX] Fix Compiler Flags and Bugs on AIX to Pass All Tests #3219

Merged
merged 5 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion programs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ zstd-pgo :
$(MAKE) zstd MOREFLAGS=-fprofile-use

## zstd-small: minimal target, supporting only zstd compression and decompression. no bench. no legacy. no other format.
zstd-small: CFLAGS = -Os -s
zstd-small: CFLAGS = -Os -Wl,-s
zstd-frugal zstd-small: $(ZSTDLIB_CORE_SRC) zstdcli.c util.c timefn.c fileio.c fileio_asyncio.c
$(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOTRACE -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=0 $^ -o $@$(EXT)

Expand Down
2 changes: 1 addition & 1 deletion programs/dibio.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ int DiB_trainFromFiles(const char* dictFileName, size_t maxDictSize,
}

/* Checks */
if ((!sampleSizes) || (!srcBuffer) || (!dictBuffer))
if ((fs.nbSamples && !sampleSizes) || (!srcBuffer) || (!dictBuffer))
EXM_THROW(12, "not enough memory for DiB_trainFiles"); /* should not happen */
if (fs.oneSampleTooLarge) {
DISPLAYLEVEL(2, "! Warning : some sample(s) are very large \n");
Expand Down
2 changes: 1 addition & 1 deletion programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static void ABRThandler(int sig) {
}
#endif

void FIO_addAbortHandler()
void FIO_addAbortHandler(void)
{
#if BACKTRACE_ENABLE
signal(SIGABRT, ABRThandler);
Expand Down
3 changes: 3 additions & 0 deletions programs/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,9 @@ int UTIL_countCores(int logical)

int UTIL_countCores(int logical)
{
/* suppress unused parameter warning */
(void)logical;

/* assume 1 */
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/playTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ zstd -d -f tmp_corrupt.zst --no-check
zstd -d -f tmp_corrupt.zst --check --no-check # final flag overrides
zstd -d -f tmp.zst --no-check

if [ "$isWindows" = false ]; then
if [ "$isWindows" = false ] && [ "$UNAME" != "AIX" ]; then
if [ -n "$(which readelf)" ]; then
println "test: check if binary has executable stack (#2963)"
readelf -lW "$ZSTD_BIN" | grep 'GNU_STACK .* RW ' || die "zstd binary has executable stack!"
Expand Down