diff options
author | Lukas Larsson <[email protected]> | 2013-03-14 15:42:19 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-02-24 15:15:55 +0100 |
commit | 200fbe924466720bd2a8c5eb05b05d67b0a2414c (patch) | |
tree | e78056a1247d75978646b629cd0e01688e65ff58 /make | |
parent | fdcdaca338849d7f63d4300e489318f6ee275d82 (diff) | |
download | otp-200fbe924466720bd2a8c5eb05b05d67b0a2414c.tar.gz otp-200fbe924466720bd2a8c5eb05b05d67b0a2414c.tar.bz2 otp-200fbe924466720bd2a8c5eb05b05d67b0a2414c.zip |
Added support for ENEA OSE
This port has support for both non-smp and smp.
It contains a new way to do io checking in which erts_poll_wait
receives the payload of the polled entity. This has implications
for all linked-in drivers.
Diffstat (limited to 'make')
-rw-r--r-- | make/ose_lm.mk.in | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/make/ose_lm.mk.in b/make/ose_lm.mk.in new file mode 100644 index 0000000000..38d40c4301 --- /dev/null +++ b/make/ose_lm.mk.in @@ -0,0 +1,71 @@ +#-*-makefile-*- ; force emacs to enter makefile-mode +# ---------------------------------------------------- +# Template target for generating an OSE5 load module +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2013. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% +# +# Author: Petre Pircalabu +# ---------------------------------------------------- + +# ---------------------------------------------------- +# build-ose-load-module +# Creates an OSE5 load module +# params: +# $(1) - The output target +# $(2) - Objects +# $(3) - Libraries +# $(4) - LM configuration file +# ---------------------------------------------------- + +ifeq ($(findstring ose,$(TARGET)),ose) +LDR1FLAGS = @erl_xcomp_ose_ldflags_pass1@ +LDR2FLAGS = @erl_xcomp_ose_ldflags_pass2@ +OSEROOT = @erl_xcomp_ose_OSEROOT@ +LCF = @erl_xcomp_ose_LM_LCF@ +LMCONF = @erl_xcomp_ose_LM_CONF@ +STRIP = @erl_xcomp_ose_STRIP@ +LM_POST_LINK = @erl_xcomp_ose_LM_POST_LINK@ +LM_SET_CONF = @erl_xcomp_ose_LM_SET_CONF@ +LM_ELF_SIZE = @erl_xcomp_ose_LM_ELF_SIZE@ +endif + +define build-ose-load-module + @echo " --- Linking $(1)" + + @echo " --- Linking $(1) (pass 1)" + $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured_ro -r \ + $(2) --start-group $(3) --end-group --cref --discard-none -M > $(1)_1.map + + @echo " --- Linking $(1) (pass 2)" + $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured \ + $(1)_unconfigured_ro -T $(LCF) -n --emit-relocs -e crt0_lm --cref \ + --discard-none -M > $(1)_2.map + + @echo " --- Inserting configuration" + $(ld_verbose) $(LM_SET_CONF) $(1)_unconfigured < $(4) + + @echo " --- Striping $(1)" +# $(ld_verbose) $(STRIP) $(1)_unconfigured + + @echo " --- Postlinking $(1)" + $(ld_verbose) $(LM_POST_LINK) $(1)_unconfigured + + @echo " --- Sizing $(1)" + $(ld_verbose) $(LM_ELF_SIZE) $(1)_unconfigured + mv $(1)_unconfigured $(1) +endef |