Changeset f3a605be in mainline
- Timestamp:
- 2011-06-20T02:36:25Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5c5117c
- Parents:
- d900699
- Location:
- uspace/app/binutils
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/binutils/Makefile
rd900699 rf3a605be 88 88 BINUTILS_CONFIGURED = $(REDIST_DIR)/Makefile 89 89 90 # Generated source file for libposix function stubs without posix_ prefix. 91 CONFOBJ_SOURCE = ./confobj.c 92 93 # Dummy object file for libposix function stubs without posix_ prefix.. 94 # Required by binutils configure script tests that links against symbols 95 # without including headers (which means that symbols are not prefixed). 96 CONFOBJ_OBJECT = $(subst $(space),\ ,$(shell pwd))/confobj.o 97 90 98 # Map the HelenOS target to binutils target. 91 99 ifeq ($(PLATFORM),amd64) … … 133 141 ifeq ($(COMPILER),$(findstring $(COMPILER),$(SUPPORTED_COMPILERS))) 134 142 all: $(COMMON_MAKEFILE_PATCHED) all_ $(TOOLCHAIN) $(BINUTILS_PATCHED) \ 135 $( BINUTILS_CONFIGURED) $(REDIST_DETECT)143 $(CONFOBJ_OBJECT) $(BINUTILS_CONFIGURED) $(REDIST_DETECT) 136 144 make -C $(REDIST_DIR) $(MAKE_TARGETS) 137 145 cp -f $(REDIST_DIR)/gas/as-new ./as … … 156 164 touch $@ 157 165 166 # Generate stubs for libposix functions without posix_ prefix. 167 $(CONFOBJ_SOURCE): 168 echo '/* GENERATED FILE. DO NOT MODIFY. */' > $@; \ 169 grep -r -o -h -I -E 'posix_[^ \(]*\(' $(LIBPOSIX_PREFIX) | \ 170 sort -u | \ 171 sed 's/posix_\([^ (]*\)(/char \1() { return 0; }/g' >> $@ 172 173 # Compile dummy object for configure script tests. 174 $(CONFOBJ_OBJECT): $(CONFOBJ_SOURCE) $(TOOLCHAIN) 175 ./gcc -c -o $@ $< 176 158 177 # Generate false toolchain scripts. 159 178 $(TOOLCHAIN): $(TOOLCHAIN_SCRIPT) 160 ./$< gcc $(CC) '$(CFLAGS)' 179 ./$< gcc $(CC) \ 180 '$(CFLAGS)' '$(LINKER_SCRIPT)' '$(LIBS) $(BASE_LIBS) $(CONFOBJ_OBJECT)' 161 181 ./$< as $(AS) 162 182 ./$< ar $(AR) 163 183 ./$< ranlib 164 ./$< ld $(LD) '$(LFLAGS)' '$(LINKER_SCRIPT)' '$(LIBS) $(BASE_LIBS)' 184 ./$< ld $(LD) \ 185 '$(LFLAGS)' '$(LINKER_SCRIPT)' '$(LIBS) $(BASE_LIBS)' 165 186 ./$< objdump $(OBJDUMP) 166 187 ./$< objcopy $(OBJCOPY) … … 185 206 clean: $(BINUTILS_PATCH) clean_ 186 207 rm -f as ld 208 rm -f $(CONFOBJ_SOURCE) $(CONFOBJ_OBJECT) 187 209 if [ -e $(REDIST_DIR)/Makefile ]; then \ 188 210 make -C $(REDIST_DIR) distclean; \ -
uspace/app/binutils/toolchain.sh
rd900699 rf3a605be 52 52 # special approach because binutils use it for both compilation and 53 53 # linkage. In case the linking usage is detected, the call is redirected 54 # to the linker. 54 # to the linker. There is also special case for configure script tests 55 # that require compiler link step. 55 56 # 56 57 … … 77 78 sed 's/-g//g' | \ 78 79 sed 's/ [ ]*/ /g'`" 79 echo ' echo' \'"$2"\' \'"$CFLAGS"\' '"$@"' 80 echo " $2" "$CFLAGS" '$@' 80 echo ' CONFTEST="`echo $* | grep '\' conftest \''`"' 81 echo ' if [ -n "$CONFTEST" ]; then' 82 echo ' LFLAGS="-Xlinker -z -Xlinker muldefs"' 83 echo ' echo' \'"$2 $CFLAGS -T $4"\' '"$LFLAGS"' '"$@"' \'"$5"\' 84 echo " $2 $CFLAGS -T $4" '$LFLAGS' '$@' "$5" 85 echo ' else' 86 echo ' echo' \'"$2 $CFLAGS"\' '"$@"' 87 echo " $2 $CFLAGS" '$@' 88 echo ' fi' 81 89 echo 'fi' 82 90 ) > 'gcc'
Note:
See TracChangeset
for help on using the changeset viewer.