Changeset d48008d for lib/Makefile.am


Ignore:
Timestamp:
05/16/10 21:34:48 (11 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
c3f597e
Parents:
9da93dc
Message:

Add JITting of BPF bytecode using LLVM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/Makefile.am

    rf1ab057 rd48008d  
    33
    44AM_CFLAGS=@LIBCFLAGS@
     5AM_CXXFLAGS=@LIBCXXFLAGS@
    56
    67extra_DIST = format_template.c
     
    4647EXTRA_DIST=format_dag24.c format_dag25.c
    4748
     49if HAVE_LLVM
     50BPFJITSOURCE=bpf-jit/bpf-jit.cc
     51else
     52BPFJITSOURCE=
     53endif
     54
     55
    4856libtrace_la_SOURCES = trace.c common.h \
    4957                format_erf.c format_pcap.c format_legacy.c \
     
    5664                protocols_transport.c protocols.h \
    5765                $(DAGSOURCE) format_erf.h \
     66                $(BPFJITSOURCE) \
    5867                $(LIBTRACEIO_ZLIB) $(LIBTRACEIO_BZLIB) $(LIBTRACEIO_LZO) \
    5968                ior-peek.c ior-stdio.c ior-thread.c \
     
    7483dagopts.c:
    7584        cp @DAG_TOOLS_DIR@/dagopts.c .
     85
     86if HAVE_LLVM
     87# Rules to build the llvm .cc file from a C description of each opcode.
     88bpf-jit/bpf-opcodes.llvm.bc: bpf-jit/bpf-opcodes.c
     89        `$(LLVM_CONFIG) --bindir`/llvm-gcc -std=c99 -c -O0 -emit-llvm $< -o $@
     90
     91bpf-jit/bpf-opcodes.llvm.cc: bpf-jit/bpf-opcodes.llvm.bc
     92        `$(LLVM_CONFIG) --bindir`/llc -f -march=cpp -cppgen=module $< -o $@
     93
     94bpf-jit/bpf-jit.cc: bpf-jit/bpf-opcodes.llvm.cc
     95
     96EXTRA_DIST+=bpf-jit/bpf-opcodes.c
     97BUILT_SOURCES=bpf-jit/bpf-opcodes.llvm.cc
     98endif
     99CLEANFILES=bpf-jit/bpf-opcodes.llvm.cc bpf-jit/bpf-opcodes.llvm.bc
Note: See TracChangeset for help on using the changeset viewer.