diff --git a/.gitignore b/.gitignore deleted file mode 100644 index be5a00ec3..000000000 --- a/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -*~ -*.orig -*.swp -*.rej - -/build -/contrib -/depot -/public -/repos/world -##### TUP GITIGNORE ##### -##### Lines below automatically generated by Tup. -##### Do not edit. -.tup -/.gitignore -/dev -/out diff --git a/Tuprules.tup b/Tuprules.tup index 3531f0578..6e3bff944 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -95,35 +95,6 @@ export STRIP !ln = |> ln -s %f %o |> -&LD_SCRIPT_SO = repos/base/src/ld/genode_rel.ld - -ifeq (@(TUP_ARCH),x86_64) - ASM_SYM_DEPENDENCY = movq \1@GOTPCREL(%rip), %rax -else - ASM_SYM_DEPENDENCY = .long \1 -endif - -!abi_stub = |> ^ STUB %o^\ - sed \ - -e "s/^\(\w\+\) D \(\w\+\)\$/.data; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ - -e "s/^\(\w\+\) V/.data; .weak \1; .type \1,%%object; \1:/" \ - -e "s/^\(\w\+\) T/.text; .global \1; .type \1,%%function; \1:/" \ - -e "s/^\(\w\+\) R \(\w\+\)\$/.section .rodata; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ - -e "s/^\(\w\+\) W/.text; .weak \1; .type \1,%%function; \1:/" \ - -e "s/^\(\w\+\) B \(\w\+\)\$/.bss; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ - -e "s/^\(\w\+\) U/.text; .global \1; $(ASM_SYM_DEPENDENCY)/" \ - %f \ - | $(CC) -x assembler -c - -o tmp.o; \ - $(LD) -o %o \ - -shared \ - -T &(LD_SCRIPT_SO) \ - tmp.o; \ - rm tmp.o; \ -|> $(DEV_DIR)/lib/%B.lib.so $(GENODE_DIR)/ - -BASE_DIR = $(GENODE_DIR)/repos/base -&BASE_DIR = repos/base - !incbin = |> ^ incbin %f^ \ export SYM=_binary_`echo %f | sed 's/\./_/g'`; \ echo ".global ${SYM}_start, ${SYM}_end; .data; .align 4; ${SYM}_start:; .incbin \"%f\"; ${SYM}_end:" \ diff --git a/repos/Tuprules.tup b/repos/Tuprules.tup new file mode 100644 index 000000000..82aa458b2 --- /dev/null +++ b/repos/Tuprules.tup @@ -0,0 +1,31 @@ +# Tup rules that are local to this Git repo and +# should not be shared with other projects. + +&LD_SCRIPT_SO = base/src/ld/genode_rel.ld + +ifeq (@(TUP_ARCH),x86_64) + ASM_SYM_DEPENDENCY = movq \1@GOTPCREL(%rip), %rax +else + ASM_SYM_DEPENDENCY = .long \1 +endif + +!abi_stub = |> ^ STUB %o^\ + sed \ + -e "s/^\(\w\+\) D \(\w\+\)\$/.data; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ + -e "s/^\(\w\+\) V/.data; .weak \1; .type \1,%%object; \1:/" \ + -e "s/^\(\w\+\) T/.text; .global \1; .type \1,%%function; \1:/" \ + -e "s/^\(\w\+\) R \(\w\+\)\$/.section .rodata; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ + -e "s/^\(\w\+\) W/.text; .weak \1; .type \1,%%function; \1:/" \ + -e "s/^\(\w\+\) B \(\w\+\)\$/.bss; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ + -e "s/^\(\w\+\) U/.text; .global \1; $(ASM_SYM_DEPENDENCY)/" \ + %f \ + | $(CC) -x assembler -c - -o tmp.o; \ + $(LD) -o %o \ + -shared \ + -T &(LD_SCRIPT_SO) \ + tmp.o; \ + rm tmp.o; \ +|> $(DEV_DIR)/lib/%B.lib.so $(GENODE_DIR)/ + +BASE_DIR = $(GENODE_DIR)/repos/base +&BASE_DIR = base