Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #857: sharedUserLibrary.patch

File sharedUserLibrary.patch, 1.5 kB (added by goshawk, 2 years ago)

shared user library for x86_64 ubuntu linux on 5/09/09

  • arch/ldcSo.rules

    old new  
     1# common make rules for native static compilation with ldc 
     2 
     3LIB_EXT=so 
     4LIB_PREFIX=lib 
     5OBJ_EXT=o 
     6COBJ_EXT=o 
     7LIB_DIR="-L=-L" 
     8LIB_LINK="-L=-l" 
     9OUT_NAME="-of=" 
     10mkLib=gcc -shared -o 
     11ranlib= 
     12 
     13DFLAGS_ALL=$(DFLAGS_MAIN) $(DFLAGS_COMP) $(DFLAGS_ADD) 
     14CFLAGS_ALL=$(CFLAGS) $(CFLAGS_MAIN) $(CFLAGS_COMP) $(CFLAGS_ADD) 
     15 
     16EXCLUDE_DEP_COMP= ^ldc\. 
     17 
     18%.dep:%.d 
     19    $(DC) -c -v $(DFLAGS_ALL) -of=$(@:%.dep=%.o) $< | $(TOOLDIR)/toMakeDeps.sh --target $(@:%.dep=%.o) $(EXCLUDE_DEP_ALL) > $@ 
     20    if [ ! -r $(@:%.dep=%.o) ] ; then $(DC) -c $(DFLAGS_ALL) -of=$(@:%.dep=%.o) $< ; [ -r $(@:%.dep=%.o) ] ; fi 
     21 
     22%.o:%.d 
     23    $(DC) -c -v $(DFLAGS_ALL) -of=$@ $< | $(TOOLDIR)/toMakeDeps.sh --target $(<:%.d=%.o) $(EXCLUDE_DEP_ALL) > $(@:.o=%.dep) 
     24    if [ ! -r $@ ] ; then $(DC) -c $(DFLAGS_ALL) -of=$@ $< ; [ -r $@ ] ; fi 
     25 
     26LCC=llc 
     27 
     28%.o:%.s 
     29    $(CC) -c $(CFLAGS_ALL) $< -o$@ 
     30 
     31%.o:%.S 
     32    $(CC) -c $(CFLAGS_ALL) $< -o$@ 
     33 
     34%.o:%.c 
     35    $(CC) -c $(CFLAGS_ALL) $< -o$@ 
     36 
     37%.bc:%.ll 
     38    $(LLC) -f -o=$@ $< 
  • arch/linux-x86_64-ldc-soopt.mak

    old new  
     1include $(ARCHDIR)/ldcSo.rules 
     2include $(ARCHDIR)/linux.inc 
     3 
     4DFLAGS_COMP=-inline -release -O2 -g -relocation-model=pic 
     5CFLAGS_COMP=-O2 -fPIC