There is no way to resolve relative paths in linkobj's pragma unless one cd into the source tree
|
|
Bugzilla Link |
1170 |
Created on |
Nov 04, 2015 14:25 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
The output for Raphael:
gcc: error: src/test.o: No such file or directory
abort: System failed to execute shell command
abort: gcc -std=gnu99 /tmp/SAC_N1B09J/fun1.o /tmp/SAC_N1B09J/globals.o src/test.o
abort: -Ltest
abort: -L/usr/local/lib/sac2c/1.2.beta-BlackForest-54-8d30-dirty/modlibs/host/seq
Source tree:
test
├── main.sac
├── mod.sac
└── src
├── test.c
└── test.o
test.c:
int SACfoo (int a)
{
return a + 1;
}
mod.sac:
module mod;
export all;
external int foo (int x);
#pragma linkname "SACfoo"
#pragma linksign [0,1]
#pragma linkobj "src/test.o"
A call from test's parent directory:
sac2c test/mod.sac -Xl -Ltest