mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-09 14:00:17 +00:00
.so files can be stripped such that they contain no "regular" symbol
table but do still contain the "dynamic" symbol table, this is pretty
typical for .so files. QB64-PE is supposed to check both tables when
linking against a .so file, but a bug in ab0c2b18
meant that the second
run of nm with the -D flag to check the dynamic symbol table no longer
happens. The fix is to introduce a new output file for the dynamic run
so that they are handled separately in terms of caching the result.
A new test .so file that only contains a dynamic symbol table was added
to avoid this in the future.
Fixes: #301
34 lines
989 B
QBasic
34 lines
989 B
QBasic
|
|
'
|
|
' Removes all the temporary build files (Various .o, .a, and ./internal/temp, among other things)
|
|
'
|
|
SUB PurgeTemporaryBuildFiles (os AS STRING, mac AS LONG)
|
|
make$ = GetMakeExecutable$
|
|
|
|
IF os = "WIN" THEN
|
|
SHELL _HIDE "cmd /c " + make$ + " OS=win clean"
|
|
ELSEIF os = "LNX" THEN
|
|
IF mac THEN
|
|
SHELL _HIDE make$ + " OS=osx clean"
|
|
ELSE
|
|
SHELL _HIDE make$ + " OS=lnx clean"
|
|
END IF
|
|
END IF
|
|
END SUB
|
|
|
|
'
|
|
' Returns the make executable to use, with path if necessary
|
|
'
|
|
FUNCTION GetMakeExecutable$ ()
|
|
IF os$ = "WIN" THEN
|
|
GetMakeExecutable$ = "internal\c\c_compiler\bin\mingw32-make.exe"
|
|
ELSE
|
|
GetMakeExecutable$ = "make"
|
|
END IF
|
|
END FUNCTION
|
|
|
|
FUNCTION MakeNMOutputFilename$ (libfile AS STRING, dynamic As Long)
|
|
If dynamic Then dyn$ = "_dynamic" Else dyn$ = ""
|
|
|
|
MakeNMOutputFilename$ = tmpdir$ + "nm_output_" + StrReplace$(StrReplace$(libfile, pathsep$, "."), ":", ".") + dyn$ + ".txt"
|
|
END FUNCTION
|