Introduce target-specific LDFLAGS, the same way we have CFLAGS for the target.
It seems to be helping gcc somewhat into telling the correct endianness to ld that sticks with little endian even when the target is big (eg armeb-unknown-linux-uclibcgnueabi).
There's still work to do, especially finish the gcc part that is not in this commit.
/trunk/scripts/functions | 9 7 2 0 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
1 # Makefile.in for building crosstool-NG
2 # This file serves as source for the ./configure operation
6 # Check if Makefile is up to date:
8 @echo "$< did changed: you must re-run './configure'"
11 ###############################################################################
12 # Configuration variables
21 MAKE := $(shell which $(MAKE) || type -p $(MAKE) || echo /usr/bin/make)
23 ###############################################################################
26 build: build-bin build-lib build-man
28 install: install-local-test build install-bin install-lib install-doc install-man
30 clean: clean-bin clean-lib clean-doc
36 uninstall: install-local-test uninstall-bin uninstall-lib uninstall-doc uninstall-man
38 ###############################################################################
41 #--------------------------------------
50 build-man: docs/ct-ng.1.gz
52 docs/ct-ng.1.gz: docs/ct-ng.1
58 @sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;' \
59 -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
60 -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
61 -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;' \
62 -e 's,@@CT_MANDIR@@,$(MANDIR),g;' \
63 -e 's,@@CT_VERSION@@,$(VERSION),g;' \
64 -e 's,@@CT_DATE@@,$(DATE),g;' \
67 #--------------------------------------
77 @echo " RM docs/ct-ng.1"
79 @echo " RM docs/ct-ng.1.gz"
80 @rm -f docs/ct-ng.1.gz
82 #--------------------------------------
85 # If using locally, don't install
87 @if [ "$(LOCAL)" = "1" ]; then \
88 echo "You're using local copy as runtime. You can't (un)install."; \
92 install-bin: install-local-test $(BINDIR)
94 @install -m 755 ct-ng $(BINDIR)/ct-ng
96 install-lib: install-local-test $(LIBDIR) install-lib-main install-lib-samples
98 install-lib-main: install-local-test $(LIBDIR)
99 @for src_dir in arch config kconfig patches scripts tools; do \
100 echo " INST $${src_dir}/"; \
101 tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
103 @rm -f $(LIBDIR)/tools/addToolVersion.sh
104 @echo " INST steps.mk"
105 @install -m 644 steps.mk $(LIBDIR)/steps.mk
106 @echo " INST .version"
107 @echo "$(VERSION)" >$(LIBDIR)/.version
109 # Samples need a little love:
110 # - change every occurrence of CT_TOP_DIR to CT_LIB_DIR
111 install-lib-samples: install-local-test $(LIBDIR) install-lib-main
112 @echo " INST samples/"
113 @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
114 @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
115 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
118 install-doc: install-local-test $(DOCDIR)
119 @for doc_file in docs/CREDITS docs/overview.txt; do \
120 echo " INST $${doc_file}"; \
121 install -m 644 "$${doc_file}" $(DOCDIR); \
124 install-man: install-local-test $(MANDIR)
125 @echo " INST ct-ng.1.gz"
126 @install -m 644 docs/ct-ng.1.gz $(MANDIR)
128 $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
130 @install -m 755 -d $@
133 #--------------------------------------
136 uninstall-bin: install-local-test
137 @rm -f $(BINDIR)/ct-ng
139 uninstall-lib: install-local-test
142 uninstall-doc: install-local-test
145 uninstall-man: install-local-test
146 @rm -f $(MANDIR)/ct-ng.1{,.gz}