Skip to content

Commit

Permalink
BUILD: Fix PSP compiler failing during C++ version tests
Browse files Browse the repository at this point in the history
The blessed way to run the compiler is to use some custom GNU Make
file from PSPSDK, which we do not use, which sets the appropriate
linker flags. Running the compiler stand-alone just fails at link
time because crt0.o references libraries which are not included
by default.

The main compiler test was changed to not link
in 513cdb4, apparently because the
PS2SDK did the same thing, and now that we have more tests (some
of which do require linking since we test for unresolvable
symbols), it is really necessary to get the flags set up early.
  • Loading branch information
csnover authored and rsn8887 committed Mar 14, 2019
1 parent 3d41ee9 commit 7693818
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions configure
Expand Up @@ -1835,6 +1835,15 @@ psp)
echo "Please set PSPSDK in your environment. export PSPSDK=<path to psp sdk>"
exit 1
fi

# These have to be set early because the compiler will not link successfully
# during testing otherwise
if test -d "$PSPDEV/psp/lib"; then
append_var LDFLAGS "-L$PSPDEV/psp/lib"
fi
append_var LDFLAGS "-L$PSPSDK/lib"
append_var LDFLAGS "-specs=$_srcdir/backends/platform/psp/psp.spec"

;;
riscos)
if test -z "$GCCSDK_INSTALL_ENV"; then
Expand Down Expand Up @@ -2865,12 +2874,6 @@ case $_host_os in
add_line_to_config_h "#define PREFIX \"${prefix}\""
;;
psp)
if test -d "$PSPDEV/psp/lib"; then
append_var LDFLAGS "-L$PSPDEV/psp/lib"
fi
append_var LDFLAGS "-L$PSPSDK/lib"
append_var LDFLAGS "-specs=$_srcdir/backends/platform/psp/psp.spec"
_optimization_level=-O3
append_var CXXFLAGS "-I$PSPSDK/include"
# FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this.
append_var CXXFLAGS "-D_PSP_FW_VERSION=150"
Expand Down

0 comments on commit 7693818

Please sign in to comment.