Print this page
11645 tst.utf8probefunc.ksh needs to specify -m32 consistently

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/dtrace/test/tst/common/pid/tst.utf8probefunc.ksh
          +++ new/usr/src/cmd/dtrace/test/tst/common/pid/tst.utf8probefunc.ksh
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4  # Common Development and Distribution License ("CDDL"), version 1.0.
   5    5  # You may only use this file in accordance with the terms of version
   6    6  # 1.0 of the CDDL.
   7    7  #
   8    8  # A full copy of the text of the CDDL should have accompanied this
   9    9  # source.  A copy of the CDDL is also available via the Internet at
  10   10  # http://www.illumos.org/license/CDDL.
  11   11  #
  12   12  
  13   13  #
  14      -# Copyright (c) 2013 Joyent, Inc.  All rights reserved.
       14 +# Copyright 2019 Joyent, Inc.
  15   15  #
  16   16  
  17   17  DIR=/var/tmp/dtest.$$
  18   18  mkdir $DIR
  19   19  cd $DIR
  20   20  
  21   21  cat > foo.c <<EOF
  22   22  #include <stdio.h>
  23   23  
  24   24  void
↓ open down ↓ 11 lines elided ↑ open up ↑
  36   36  
  37   37  if ! gcc -m32 -S -o foo.orig.s foo.c ; then
  38   38          print -u 2 "failed to compile foo in $DIR"
  39   39          exit 1
  40   40  fi
  41   41  
  42   42  #
  43   43  # There's the right way, the wrong way, and the Max Power way!
  44   44  #
  45   45  cat foo.orig.s | sed 's/foo/foø/g' > foo.s
  46      -gcc -o foo foo.s
       46 +gcc -m32 -o foo foo.s
  47   47  
  48   48  if ! dtrace -n 'pid$target:a.out:f*:entry{printf("probefunc: %s\n", \
  49   49      probefunc)}' -qc ./foo ; then
  50   50          print -u 2 "dtrace failed in $DIR"
  51   51          exit 1
  52   52  fi
  53   53  
  54   54  cd
  55   55  rm -rf $DIR
  56   56  exit 0
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX