# HG changeset patch # User Christian Kamm # Date 1221395771 -7200 # Node ID e096a15024287b15297e78598f723eaa91346a10 # Parent 7042d912767ebfa5c563081baa57e6f44a87ab80 Fix #88 : pragma(lib, "str") is now converted to -lstr in the linker command line. diff -r 7042d912767e -r e096a1502428 gen/toir.cpp --- a/gen/toir.cpp Sun Sep 14 13:47:38 2008 +0200 +++ b/gen/toir.cpp Sun Sep 14 14:36:11 2008 +0200 @@ -21,6 +21,7 @@ #include "template.h" #include "hdrgen.h" #include "port.h" +#include "mem.h" #include "gen/irstate.h" #include "gen/logger.h" @@ -2551,9 +2552,12 @@ return 0; } -void obj_includelib(char*) +void obj_includelib(char* lib) { -// FIXME: we want to support pragma(lib) + char *arg = (char *)mem.malloc(64); + strcpy(arg, "-l"); + strncat(arg, lib, 64); + global.params.linkswitches->push(arg); } void backend_init()