Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix dladdr bogosities: test if dladdr is supported on the platform, and add an ldso_stub for it if so. This so that SBCL isn't dependant on the dladdr being at the same location at runtime as it was on the build-host. Move the dummy definition for FOREIGN-SYMBOL-IN-ADDRESS to target-load, so that backtraces on target will work before foreign.lisp is built. Clean up the real F-S-I-A definition to use the :os-provides-dladdr feature. * Fix manual bogosities: generate functions signalling UNSUPPORTED-OPERATOR-ERROR for SB-BSD-SOCKETS platform-dependant sockopts on platforms where they're not supported; make these functions have the normal doctrings. This so that manual building will work on non-Linux as well. Also clean up the .sbclrc examples slightly.
- Loading branch information
Showing
10 changed files
with
142 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
# Automated platform feature testing | |||
|
|||
DIR=tools-for-build | |||
|
|||
# FIXME: Use this to test for dlopen presence and hence | |||
# load-shared-object buildability | |||
|
|||
# $1 feature | |||
# $2 additional flags | |||
# | |||
# Assumes the presence of $1-test.c, which when built and | |||
# run should return with 104 if the feature is present. | |||
# | |||
featurep() { | |||
bin="$DIR/$1-test" | |||
rm -f $bin | |||
cc $DIR/$1-test.c $2 -o $bin 2>&1 > /dev/null && $bin 2>&1 /dev/null | |||
if [ "$?" = 104 ] | |||
then | |||
printf " :$1" | |||
fi | |||
rm -f $bin | |||
} | |||
|
|||
featurep os-provides-dladdr -ldl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,20 @@ | |||
/* test to build and run so that we know if we have dladdr | |||
*/ | |||
|
|||
/* bloody FSF dlcfn.h won't give us dladdr without this */ | |||
#define _GNU_SOURCE | |||
|
|||
#include <dlfcn.h> | |||
|
|||
int main () | |||
{ | |||
void * handle = dlopen((void*)0, RTLD_GLOBAL | RTLD_NOW); | |||
void * addr = dlsym(handle, "printf"); | |||
Dl_info * info = (Dl_info*) malloc(sizeof(Dl_info)); | |||
dladdr(addr, info); | |||
if (strcmp(info->dli_sname, "printf")) { | |||
return 1; | |||
} else { | |||
return 104; | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters