Skip to content

Conversation

@YUKI2eN3e
Copy link
Contributor

Added #include <sys/syslimits.h> to fix PATH_MAX not being defined in libcglue/glue.c.

@diamant3
Copy link
Member

diamant3 commented Feb 2, 2025

Hello, Thanks for the PR! but could you provide your GCC version by typing psp-gcc -v and your current OS? thanks.

PATH_MAX issue was fixed by pspdev/psptoolchain-allegrex#37

@YUKI2eN3e
Copy link
Contributor Author

OS: Arch Linux via WSL2

GCC:

$ psp-gcc -v
Using built-in specs.
COLLECT_GCC=psp-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/psp/14.1.0/lto-wrapper
Target: psp
Configured with: ../configure --quiet --prefix=/usr --target=psp --enable-languages=c,c++ --with-float=hard --with-newlib --disable-libssp --disable-multilib --enable-threads=posix --disable-tls --disable-nls --silent
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.0 (GCC)
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20240910 (GCC)

@YUKI2eN3e
Copy link
Contributor Author

I just realized that was psp-gcc from AUR.
Here's the pspdev one:

$ $(psp-config --pspdev-path)/bin/psp-gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/pspdev/bin/psp-gcc
COLLECT_LTO_WRAPPER=/usr/local/pspdev/libexec/gcc/psp/14.1.0/lto-wrapper
Target: psp
Configured with: ../configure --quiet --prefix=/usr/local/pspdev --target=psp --with-sysroot=/usr/local/pspdev/psp --with-native-system-header-dir=/include --enable-languages=c,c++ --with-float=hard --with-newlib --disable-libssp --disable-multilib --enable-threads=posix --disable-tls --disable-nls --silent
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.0 (GCC)

@sharkwouter
Copy link
Member

This looks like it makes sense to me honestly.

@diamant3 diamant3 merged commit 0bda2cc into pspdev:master Feb 2, 2025
1 check passed
@diamant3
Copy link
Member

diamant3 commented Feb 2, 2025

Thanks for taking a review @wouter and thanks for the PR!

@rofl0r
Copy link
Contributor

rofl0r commented Feb 2, 2025

fwiw the canonical place to get PATH_MAX is <limits.h> on POSIX platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants