glibc/sysdeps/tile/tilegx/Makefile
Chris Metcalf 4372980f58 Move tilegx, tilepro, and linux-generic from ports to libc.
I've moved the TILE-Gx and TILEPro ports to the main sysdeps hierarchy,
along with the linux-generic ports infrastructure.  Beyond the README
update, the move was just

    git mv ports/sysdeps/tile sysdeps/tile
    git mv ports/sysdeps/unix/sysv/linux/tile \
      sysdeps/unix/sysv/linux/tile
    git mv ports/sysdeps/unix/sysv/linux/generic \
      sysdeps/unix/sysv/linux/generic

I updated the relevant ChangeLogs along the lines of the ARM move
in commit c6bfe5c4d7 and tested the 64-bit tilegx build to confirm that
there were no changes in "objdump -dr" output in the shared objects.
2014-02-10 11:04:39 -05:00

36 lines
1.1 KiB
Makefile

include $(common-objpfx)cflags-mcmodel-large.mk
# Check for gcc to support the command-line switch, and for
# binutils to support the hwN_plt() assembly operators and relocations.
$(common-objpfx)cflags-mcmodel-large.mk: $(common-objpfx)config.make
mcmodel=no; \
(echo 'int main() { return getuid(); }' | \
$(CC) -o /dev/null -xc - -mcmodel=large -fpic) && mcmodel=yes; \
echo "cflags-mcmodel-large = $$mcmodel" > $@
ifeq (yes,$(cflags-mcmodel-large))
ifeq ($(subdir),csu)
# elf-init.c is in libc_nonshared.o (the end of the shared object) but
# must reach the _init symbol at the very start of the shared object.
CFLAGS-elf-init.c += -mcmodel=large
# __gmon_start__ is at the very start of the shared object when linked
# with profiling, but calls to libc.so via the PLT at the very end.
CFLAGS-gmon-start.c += -mcmodel=large
endif
else
# Don't try to compile assembly code with hwN_plt() directives if the
# toolchain doesn't support -mcmodel=large.
ifeq ($(subdir),csu)
CPPFLAGS-start.S += -DNO_PLT_PCREL
CPPFLAGS-crti.S += -DNO_PLT_PCREL
endif
ifeq ($(subdir),nptl)
CPPFLAGS-pt-crti.S += -DNO_PLT_PCREL
endif
endif