/[path-sandbox]/trunk/src/Makefile.am
Gentoo

Contents of /trunk/src/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 37 - (hide annotations) (download)
Mon Mar 14 00:28:10 2005 UTC (13 years, 7 months ago) by azarah
Original Path: trunk/Makefile.am
File size: 1715 byte(s)
Seems -nostdlib was the problem with the constructor/destructor - remove it
from Makefile.am, and change the constructor/destructor names again.

1 vapier 21 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
2 azarah 31 EXTRA_DIST = sandbox.bashrc canonicalize.c libctest.c symbols.in
3 azarah 29 CLEANFILES = symbols.h
4 ferringb 2
5 azarah 29 AM_CPPFLAGS = -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT \
6     -DLIBC_VERSION=\"$(LIBC_VERSION)\" \
7     -DLIBSANDBOX_PATH=\"$(libdir)\" \
8     -DSANDBOX_BASHRC_PATH=\"$(pkgdatadir)\"
9    
10     dist_pkgdata_DATA = sandbox.bashrc
11    
12 azarah 30 lib_LTLIBRARIES = libsandbox.la
13 ferringb 2 libsandbox_la_SOURCES = libsandbox.c sandbox_futils.c localdecls.h
14 azarah 37 # Do not add -nostdlib or -nostartfiles, as then our constructor
15     # and destructor will not be executed ...
16     libsandbox_la_LDFLAGS = -nodefaultlibs -lc -ldl
17 azarah 29 # We need -fexceptions here, else we do not catch exceptions
18     # (nptl/tst-cancelx4.c in glibc among others fails for wrapped functions).
19     libsandbox_la_CFLAGS = -fexceptions
20 ferringb 2
21 vapier 21 bin_PROGRAMS = sandbox
22 ferringb 2 sandbox_SOURCES = sandbox.c sandbox.h sandbox_futils.c getcwd.c
23 azarah 29 sandbox_CFLAGS = -DOUTSIDE_LIBSANDBOX
24    
25     libsandbox.c: symbols.h
26    
27     # Basically generates symbols.h from the function names in symbols.in.
28     # Not sure if we can count on the latest version the only symbol
29     # countaining '@@' ...
30     symbols.h: symbols.in
31     @echo "Generating $@"; \
32 ferringb 33 if [ ! -e "$(LIBC_PATH)" ]; then\
33     echo -e "\n*** Cannot find $(LIBC_PATH)!\n"; \
34 azarah 29 exit 1; \
35     fi; \
36     echo "#ifndef __symbol_h" > $@; \
37     echo -e "#define __symbol_h\n" >> $@; \
38     for x in `cat $^`; do \
39 ferringb 33 sym=`readelf -s "$(LIBC_PATH)" 2>/dev/null | \
40 azarah 29 awk '{ print $$8 }' | \
41     grep "^$${x}@@" | \
42     cut -d'@' -f3`; \
43     echo "#define symname_$${x} \"$${x}\"" >> $@; \
44     if [ -n "$${sym}" ]; then \
45     echo "#define symver_$${x} \"$${sym}\"" >> $@; \
46     else \
47     echo "#define symver_$${x} NULL" >> $@; \
48     fi; \
49     done; \
50     echo -e "\n#endif /* __symbol_h */" >> $@
51    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20