Print this page
10367 ld(1) tests should be a real test suite
10368 want an ld(1) regression test for i386 LD tls transition (10267)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/test/ld/x64/tls/ie/Makefile
          +++ new/usr/src/test/elf-tests/tests/tls/amd64/ie/Makefile.test
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4  # You may only use this file in accordance with the terms of version
   5    5  # 1.0 of the CDDL.
   6    6  #
   7    7  # A full copy of the text of the CDDL should have accompanied this
   8    8  # source.  A copy of the CDDL is also available via the Internet at
   9    9  # http://www.illumos.org/license/CDDL.
  10   10  #
  11   11  
  12   12  # Copyright 2012, Richard Lowe.
  13   13  
  14      -include $(SRC)/Makefile.master
       14 +CC =            gcc
       15 +CFLAGS =        -O1 -m64
  15   16  
  16      -# We have to use GCC, and only GCC.  The best way is to ask cw(1) which GCC to use.
  17      -CC_CMD =        $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc -_compiler
  18      -CC =            $(CC_CMD:sh)
  19      -CFLAGS =        -O1 -m64
  20      -
  21      -LINK.c = env LD_ALTEXEC=$(PROTO)/usr/bin/amd64/ld $(CC) $(CFLAGS) -o $@ $^
  22      -COMPILE.c = $(CC) $(CFLAGS) -c -o $@ $^
       17 +LINK.c =  $(CC) $(CFLAGS) -o $@ $^
  23   18  COMPILE.s = $(CC) $(CFLAGS) -c -o $@ $^
  24   19  
  25   20  .KEEP_STATE:
  26   21  
  27   22  install default: all
  28   23  
  29      -.c.o:
  30      -        $(COMPILE.c)
  31      -
  32      -.s.o:
       24 +%.o: $(TESTDIR)/%.s
  33   25          $(COMPILE.s)
  34   26  
  35   27  # A basic use of TLS that uses the movq m/r --> movq i/r variant
  36      -PROGS +=        style2
       28 +PROGS +=        style2
  37   29  STYLE2OBJS =    style2.o
  38   30  style2: $(STYLE2OBJS)
  39   31          $(LINK.c)
  40   32  
  41   33  # A copy of style2 that uses %r13 in the TLS sequence, and thus excercises the
  42   34  # REX transitions of the movq mem,reg -> movq imm,reg variant.
  43   35  PROGS +=        style2-with-r13
  44   36  STYLE2R13OBJS = style2-with-r13.o
  45   37  style2-with-r13: $(STYLE2R13OBJS)
  46   38          $(LINK.c)
↓ open down ↓ 24 lines elided ↑ open up ↑
  71   63          $(LINK.c)
  72   64  
  73   65  # A copy of style1-func that uses %r12 to test the addq mem,reg --> addq imm,reg variant
  74   66  PROGS +=        style1-with-r12
  75   67  STYLE1R12OBJS = style1-main.o style1-func-with-r12.o
  76   68  style1-with-r12: $(STYLE1R12OBJS)
  77   69          $(LINK.c)
  78   70  
  79   71  all:    $(PROGS)
  80   72  
  81      -clobber clean: 
       73 +clobber clean:
  82   74          rm -f $(PROGS) $(STYLE1OBJS) $(STYLE1R13OBJS) $(STYLE1R12OBJS) \
  83   75              $(STYLE2OBJS) $(STYLE2R13OBJS) $(STYLE2R12OBJS) $(STYLE2BADNESSOBJS)
  84   76  
  85   77  fail: style2-with-badness FRC
  86   78  
  87   79  FRC:
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX