components/sbsigntool/patches/03-tests_Makefile_am.patch
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 14 Oct 2016 14:53:30 -0700
changeset 7114 72d09e38c454
parent 6510 d00d3d1fc778
permissions -rw-r--r--
24850486 Yelp says XSLT stylesheet `/usr/share/yelp/xslt/mal2html.xsl' is missing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6510
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     1
# Source: Internal
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     2
# Info: Written internally so this component can run its test suite on Solaris.
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     3
# Status: This patch is offered at https://bugs.launchpad.net/ubuntu/+source/sbsigntool/+bug/1588548
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     4
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     5
--- ORIGINAL/tests/Makefile.am	2016-06-21 12:11:28.281340828 -0700
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     6
+++ sbsigntool-0.6/tests/Makefile.am	2016-06-21 12:18:30.209083024 -0700
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     7
@@ -1,33 +1,60 @@
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     8
 
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     9
 AUTOMAKE_OPTIONS = parallel-tests
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    10
 
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    11
+if SUN_OS
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    12
+  CCLD = /usr/gnu/bin/ld
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    13
+  LINK = $(CCLD) $(AM_CFLAGS) -I. -I/usr/gnu/include -I/usr/include/ -I/usr/include/efi/x86_64 -I/usr/include/efi/ -melf_x86_64_sol2 $(AM_LDFLAGS) $(LDFLAGS) -o $@
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    14
+endif
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    15
+
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    16
 test_key = private-key.rsa
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    17
 test_cert = public-cert.pem
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    18
-test_arches = x86_64 i386
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    19
-test_images = test-x86_64.pecoff test-i386.pecoff
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    20
 
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    21
-check_PROGRAMS = test-x86_64.pecoff test-i386.pecoff
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    22
+if SUN_OS
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    23
+  test_arches = x86_64
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    24
+  test_images = test-x86_64.pecoff
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    25
+  check_PROGRAMS = test-x86_64.pecoff
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    26
+  test_x86_64_pecoff_SOURCES = test.S test-x86_64_sol2.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    27
+else
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    28
+  test_arches = x86_64 i386
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    29
+  test_images = test-x86_64.pecoff test-i386.pecoff
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    30
+  check_PROGRAMS = test-x86_64.pecoff test-i386.pecoff
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    31
+  test_i386_pecoff_SOURCES = test.S test-i386.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    32
+  test_x86_64_pecoff_SOURCES = test.S test-x86_64.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    33
+endif
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    34
+
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    35
 check_DATA = $(test_key) $(test_cert)
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    36
 check_SCRIPTS = test-wrapper.sh
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    37
 
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    38
-test_i386_pecoff_SOURCES = test.S test-i386.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    39
-test_x86_64_pecoff_SOURCES = test.S test-x86_64.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    40
-
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    41
-test-%.pecoff: test-%.elf
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    42
+if SUN_OS
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    43
+  test-%.pecoff: test-%.elf
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    44
+	$(OBJCOPY) -j .text -j .sdata -j .data \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    45
+		-j .dynamic -j .dynsym  -j .rel \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    46
+		-j .rela -j .reloc \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    47
+		--target=efi-app-$(test_image_arch) $^ $@
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    48
+else
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    49
+  test-%.pecoff: test-%.elf
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    50
 	$(OBJCOPY) -j .text -j .sdata -j .data \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    51
 		-j .dynamic -j .dynsym  -j .rel \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    52
 		-j .rela -j .reloc \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    53
 		--target=efi-app-$(test_image_arch) $^ $@
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    54
 	$(STRIP) $@
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    55
+endif
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    56
 
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    57
 test-x86_64.pecoff: test_image_arch = x86-64
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    58
-test-x86_64.pecoff: test_lds = $(srcdir)/test-x86_64.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    59
+if SUN_OS
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    60
+  test-x86_64.pecoff: test_lds = $(srcdir)/test-x86_64_sol2.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    61
+else
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    62
+  test-x86_64.pecoff: test_lds = $(srcdir)/test-x86_64.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    63
+endif
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    64
 test-x86_64.pecoff: ASFLAGS += -m64
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    65
 test-x86_64.pecoff: LDFLAGS += -m64
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    66
-test-i386.pecoff: test_image_arch = i386
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    67
-test-i386.pecoff: test_lds = $(srcdir)/test-i386.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    68
-test-i386.pecoff: ASFLAGS += -m32
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    69
-test-i386.pecoff: LDFLAGS += -m32
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    70
+
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    71
+if !SUN_OS
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    72
+  test-i386.pecoff: test_image_arch = i386
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    73
+  test-i386.pecoff: test_lds = $(srcdir)/test-i386.lds
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    74
+  test-i386.pecoff: ASFLAGS += -m32
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    75
+  test-i386.pecoff: LDFLAGS += -m32
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    76
+endif
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    77
 
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    78
 test-%.elf: LDFLAGS = -nostdlib -T $(test_lds)
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    79
 test-%.elf: test-%.$(OBJEXT) $(test_lds)