Skip to content
Snippets Groups Projects
Commit 4de992e8 authored by rtoy's avatar rtoy
Browse files

lisp/lisp.c:

o Make debug_lisp_search global instead of static.

lisp/elf.c:
o Use debug_lisp_search to control printing of some debug information
  when searching for the linker script.
o Update to support executables with Unicode support.  (CMUCL_LIB is a
  wide string, so we need to hack that into a C string.  This needs
  work.)
parent 7f4c6202
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Above changes put into main CVS branch. 05-Jul-2007. Above changes put into main CVS branch. 05-Jul-2007.
$Id: elf.c,v 1.18 2009/01/20 03:58:11 agoncharov Exp $ $Id: elf.c,v 1.19 2009/07/13 19:41:54 rtoy Rel $
*/ */
#include <stdio.h> #include <stdio.h>
...@@ -331,19 +331,45 @@ elf_run_linker(long init_func_address, char *file) ...@@ -331,19 +331,45 @@ elf_run_linker(long init_func_address, char *file)
lispobj libstring = SymbolValue(CMUCL_LIB); /* Get library: */ lispobj libstring = SymbolValue(CMUCL_LIB); /* Get library: */
struct vector *vec = (struct vector *)PTR(libstring); struct vector *vec = (struct vector *)PTR(libstring);
char *paths = strdup((char *)vec->data); char *paths;
char command[FILENAME_MAX + 1]; char command[FILENAME_MAX + 1];
char command_line[FILENAME_MAX + FILENAME_MAX + 10]; char command_line[FILENAME_MAX + FILENAME_MAX + 10];
char *strptr; char *strptr;
struct stat st; struct stat st;
int ret; int ret;
extern int debug_lisp_search;
#ifndef UNICODE
paths = strdup((char *)vec->data);
#else
/*
* What should we do here with 16-bit characters? For now we just
* take the low 8-bits.
*/
paths = malloc(vec->length);
{
int k;
unsigned short *data;
data = (unsigned short*) vec->data;
for (k = 0; k < vec->length; ++k) {
paths[k] = data[k] & 0xff;
}
}
#endif
strptr = strtok(paths, ":"); strptr = strtok(paths, ":");
while(strptr != NULL) { if (debug_lisp_search) {
printf("Searching for linker.sh script\n");
}
while(strptr != NULL) {
sprintf(command, "%s/%s", strptr, LINKER_SCRIPT); sprintf(command, "%s/%s", strptr, LINKER_SCRIPT);
if (debug_lisp_search) {
printf(" %s\n", command);
}
if(stat(command, &st) == 0) { if(stat(command, &st) == 0) {
free(paths); free(paths);
printf("\t[%s: linking %s... \n", command, file); printf("\t[%s: linking %s... \n", command, file);
......
/* /*
* main() entry point for a stand alone lisp image. * main() entry point for a stand alone lisp image.
* *
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.67 2009/01/20 03:58:11 agoncharov Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.68 2009/07/13 19:41:54 rtoy Rel $
* *
*/ */
...@@ -91,7 +91,7 @@ static char *cmucllib_search_list[] = { ...@@ -91,7 +91,7 @@ static char *cmucllib_search_list[] = {
/* Set this to see how we're doing our search */ /* Set this to see how we're doing our search */
static int debug_lisp_search = FALSE; int debug_lisp_search = FALSE;
/* /*
* Define this to get some debugging printfs for searching for the * Define this to get some debugging printfs for searching for the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment