Giter Club home page Giter Club logo

nvptx-tools's Introduction

nvptx-tools's People

Contributors

amonakov avatar drepper avatar jakubjelinek avatar jsm28 avatar tob2 avatar tschwinge avatar urnathan avatar vries avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nvptx-tools's Issues

nvptx-none-run: CU_LIMIT_STACK_SIZE

For nvptx-none toolchain testing, we're using nvptx-none-run to launch kernels on a 1 x 1 x 1 grid with 1 x 1 x 1 threads. We'd like to use cuCtxSetLimit(CU_LIMIT_STACK_SIZE) to increase the per-thread stack size from its tiny default value (1 KiB?).

Even though a cuCtxGetLimit(CU_LIMIT_STACK_SIZE) does acknowledge the value set, if this is set "too high", inscrutable errors (CUDA_ERROR_ILLEGAL_ADDRESS) may result from later cuModuleLoadData (?!) or cuLaunchKernel calls.

It is unclear how to safely maximize the per-thread stack size.

as segfault with universal character name source code

$ cat ucn.c
int \u00C0;

$ cat ucn.s
// BEGIN PREAMBLE
.version 3.1
.target sm_30
.address_size 64
// END PREAMBLE

// BEGIN GLOBAL VAR DEF: À
.visible .global .align 4 .u32 À[1];

$ as ucn.s
Segmentation fault (core dumped)

backtrace:
...
(gdb) r
Starting program: as ucn.s

Program received signal SIGSEGV, Segmentation fault.
parse_file (tok=0x62f510) at src/nvptxtools-mirror/nvptx-as.c:759
759 append_stmt (&def->stmts, comment);
(gdb) bt
#0 parse_file (tok=0x62f510) at src/nvptxtools-mirror/nvptx-as.c:759
#1 process (out=0x7ffff7ad8280 <IO_2_1_stdout>, in=)
at src/nvptxtools-mirror/nvptx-as.c:828
#2 main (argc=, argv=)
at src/nvptxtools-mirror/nvptx-as.c:986
...

Unrecognized option for as --64

I'm trying to compile gcc-7.3.0 using nvptx-tools and get the following error:

make[2]: Entering directory '/scr_ivy/kruger/upstream/gcc_build_202005/build-nvptx-gcc/gcc'
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-lo
ng-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../
../gcc-7.3.0/gcc -I../../gcc-7.3.0/gcc/build -I../../gcc-7.3.0/gcc/../include  -I../../gcc-7.3.0/gcc/../libcpp/inc
lude  \
        -o build/genmddeps.o ../../gcc-7.3.0/gcc/genmddeps.c
/scr_ivy/kruger/contrib-gcc-openmp/nvptx-none/bin/as: unrecognized option '--64'
ptxas build/genmddeps.o, line 1; fatal   : Missing .version directive at start of file 'build/genmddeps.o'
ptxas fatal   : Ptx assembly aborted due to errors
nvptx-as: ptxas returned 255 exit status
Makefile:2594: recipe for target 'build/genmddeps.o' failed
make[2]: *** [build/genmddeps.o] Error 1

My configure for gcc is this:

../gcc-7.3.0/configure \
    --target=nvptx-none \
    --with-build-time-tools=$install_dir/nvptx-none/bin \
    --enable-as-accelerator-for=$target \
    --disable-sjlj-exceptions \
    --enable-newlib-io-long-long \
    --enable-languages="c,c++,fortran,lto" \
    --prefix=$install_dir

I not 100% sure this is an nvptx-tools issue, but it seems to me that g++ will always pass --64 as a standard flag to as and nvptx-tools/bin/as should be able handle it.

Get rid of dependency on CUDA runtime library?

There is currently a dependency in nvptx-run on the CUDA runtime library (libcudart) just for the call to cudaDeviceReset. If that is that really necessary, is the a similar function in the CUDA driver library (libcuda), or can this function call be removed altogether?

ld: non-standard handling of options which refer to files

This ld doesn't implement standard Unix ld semantics, where "options which refer to files, such as -l [...], cause the file to be read at the point at which the option appears in the command line, relative to the object files and other file options" (GNU Binutils 2.38 ld documentation).

Instead, this ld first collects all -l options:

https://github.com/MentorEmbedded/nvptx-tools/blob/93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b/nvptx-ld.cc#L409-L410

..., makes them unique:

https://github.com/MentorEmbedded/nvptx-tools/blob/93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b/nvptx-ld.cc#L434-L435

..., then reads all input files on the command line:

https://github.com/MentorEmbedded/nvptx-tools/blob/93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b/nvptx-ld.cc#L455-L463

..., and then processes unresolved symbols:

https://github.com/MentorEmbedded/nvptx-tools/blob/93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b/nvptx-ld.cc#L534-L535

Handle ":IND_FUNC_MAP" in nvptx-as to ensure map-directive order is kept

Similar to #29 for :VAR_MAP and :FUNC_MAP (cf. https://gcc.gnu.org/PR100059),
nvptx-as must keep the order the same for the entries of newly added indirect-function map table, for which the new tag :IND_FUNC_MAP is used.

Cross ref: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635176.html

Draft patch – should work but needs a testcase, similar to #29 / commit 3f67564 and follow up commit aa3404a.

--- a/nvptx-as.cc
+++ b/nvptx-as.cc
@@ -705,7 +705,8 @@ parse_file (htab_t symbol_table, Token *tok)
 	  /* Instead of 'K_comment', a point could be made to have these be
 	     represented as their own 'Kind'.  */
 	  if (strncmp (tok->ptr, ":VAR_MAP ", 9) == 0
-	      || strncmp (tok->ptr, ":FUNC_MAP ", 10) == 0)
+	      || strncmp (tok->ptr, ":FUNC_MAP ", 10) == 0
+	      || strncmp (tok->ptr, ":IND_FUNC_MAP ", 14) == 0)
 	    {
 	      is_map_directive = true;
 	      break;

@tschwinge @k-yeung

nvptx-none-ar and nvptx-none-ranlib

During installation, nvptx-none-ar and nvptx-none-ranlib are created as symlinks to the ar and ranlib binaries found in $PATH. (The intention is to re-use those of the GNU/Linux host system.)

This makes the installation tree non-relocatable to a different system. Maybe wrapper shell scripts should be used instead?

Add .exp for remote testing

The nvptx-none-run.exp facilitates a setup where compiling a test and running the test is done on the same machine.

It would be good to have a .exp file that facilitates a setup where compiling a test is done on one machine, and running the test on another. Put differently, nvptx-none-run.exp is based on sim.exp. We want a similar file based on, say unix.exp.

As a start, we could split nvptx-none-run.exp into two parts, one that is specific to compiling tests, and another that is specific to using sim.exp.

[RFC] Handle sm_* which is no longer supported by CUDA / ptxas exec check or configure check?

@tschwinge @vries
From https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591154.html

In PR97348, we ran into the problem that recent CUDA dropped support for
sm_30, which inhibited the build when building with CUDA bin in the path,
because the nvptx-tools assembler uses CUDA's ptxas to do ptx verification.
...
Deal with PR97348 in the simplest way possible: when calling the assembler for
sm_30, specify --no-verify.

This has the unfortunate effect that after fixing PR104758 by building
libraries with sm_30, the libraries are no longer verified. This can be
improved upon by:

  • adding a configure test in gcc that tests if CUDA supports sm_30, and
    if so disabling this patch
  • dealing with this in nvptx-tools somehow, either:
    • detect at ptxas execution time that it doesn't support sm_30, or
    • detect this at nvptx-tool configure time.

nvptx-as should not assume a default sm version

[ See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97348#c1 ]

Nvptx-as has a hardcoded default of sm_30.

Instead, it should use the sm version as specified by the .target line as default.

This makes nvptx-as robust against changes in default sm version in gcc.

[LD] Handle alias in nvptx-ld as nvptx's .alias does not handle it fully

Some ".alias" support in nvptx-ld would be useful due to the limitations listed below – and complete lack before PTX ISA 6.3 (CUDA 10). Namely:

https://gcc.gnu.org/pipermail/gcc-patches/2022-March/592127.html states:

Starting with ptx isa version 6.3, a ptx directive .alias is available.
Use this directive to support symbol aliases, as far as possible. […]
The alias support has the following limitations.

Only function aliases are supported.

Weak aliases are not supported. […]

Aliases to weak symbols are not supported […]

At some point we may add support in the nvptx-tools linker for symbol
aliases, and define f.i. malias=ptx and malias=ld to choose between the two in
the compiler.

[...]

An example of where this support is useful, is the OvO (OpenMP vs Offload) testsuite. The testsuite passes already at -O2. But at -O0, there are errors in some c++ test-cases due to missing symbol alias support.

Likewise sollve_vv's alpaka_complex_template.cpp testcase, which also fails with -O0.

@tschwinge @vries

OS X Install fails

Hi, I am trying to build GCC trunk with support for OpenACC offloading to NVIDIA devices on a macbook pro with an NVIDIA GPU. I have CUDA Toolkit-7.5 and NVIDIA drivers installed. I also have gcc 5.3.0 installed (via Homebrew).

The installation of nvptx-tools chokes looking for wait.h. Perhaps OS X is "unsupported" for now, but it would be great to be able to use gcc and gfortran with OpenACC on OS X. Do you have any tips for work arounds? Here is the output of configure and make:

$ CC=gcc-5 CXX=g++-5 ../configure --with-cuda-driver=/usr/local/cuda --prefix=$(brew --cellar)/nvptx-tools/HEAD
checking for gcc... gcc-5
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-5 accepts -g... yes
checking for gcc-5 option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++-5 accepts -g... yes
checking whether ln -s works... yes
checking for a BSD compatible install... /usr/local/bin/ginstall -c
checking for ranlib... /usr/bin/ranlib
checking for ar... /usr/bin/ar
checking for cuGetErrorName... yes
checking for cuGetErrorString... yes
checking whether cuGetErrorName is declared... yes
checking whether cuGetErrorString is declared... yes
checking for extra programs to build requiring -lcuda... nvptx-none-run
configure: creating ./config.status
config.status: creating Makefile
config.status: creating dejagnu.exp
=== configuring in libiberty (/Users/ibeekman/Downloads/nvptx-tools/build/libiberty)
configure: running /bin/sh ../../libiberty/configure --disable-option-checking '--prefix=/usr/local/Cellar/nvptx-tools/HEAD'  '--with-cuda-driver=/usr/local/cuda' 'CC=gcc-5' 'CXX=g++-5' --cache-file=/dev/null --srcdir=../../libiberty
checking whether to enable maintainer-specific portions of Makefiles... no
checking for makeinfo... makeinfo
checking for perl... perl
checking build system type... x86_64-apple-darwin15.3.0
checking host system type... x86_64-apple-darwin15.3.0
checking for ar... ar
checking for ranlib... ranlib
checking whether to install libiberty headers and static library... no
configure: target_header_dir =
checking for gcc... gcc-5
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-5 accepts -g... yes
checking for gcc-5 option to accept ISO C89... none needed
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking how to run the C preprocessor... gcc-5 -E
checking whether gcc-5 supports -W... yes
checking whether gcc-5 supports -Wall... yes
checking whether gcc-5 supports -Wwrite-strings... yes
checking whether gcc-5 supports -Wc++-compat... yes
checking whether gcc-5 supports -Wstrict-prototypes... yes
checking whether gcc-5 supports -pedantic ... yes
checking whether gcc-5 and cc understand -c and -o together... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
/bin/sh: ../../libiberty/../move-if-change: No such file or directory
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for malloc.h... no
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/time.h... yes
checking for time.h... yes
checking for sys/resource.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/mman.h... yes
checking for fcntl.h... yes
checking for alloca.h... yes
checking for sys/pstat.h... no
checking for sys/sysmp.h... no
checking for sys/sysinfo.h... no
checking for machine/hal_sysinfo.h... no
checking for sys/table.h... no
checking for sys/sysctl.h... yes
checking for sys/systemcfg.h... no
checking for stdint.h... (cached) yes
checking for stdio_ext.h... no
checking for process.h... no
checking for sys/prctl.h... no
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether errno must be declared... no
checking size of int... 4
checking for a 64-bit type... uint64_t
checking for intptr_t... yes
checking for uintptr_t... yes
checking for ssize_t... yes
checking for pid_t... yes
checking for library containing strerror... none required
checking for asprintf... yes
checking for atexit... yes
checking for basename... yes
checking for bcmp... yes
checking for bcopy... yes
checking for bsearch... yes
checking for bzero... yes
checking for calloc... yes
checking for clock... yes
checking for ffs... yes
checking for getcwd... yes
checking for getpagesize... yes
checking for gettimeofday... yes
checking for index... yes
checking for insque... yes
checking for memchr... yes
checking for memcmp... yes
checking for memcpy... yes
checking for memmem... yes
checking for memmove... yes
checking for mempcpy... no
checking for memset... yes
checking for mkstemps... yes
checking for putenv... yes
checking for random... yes
checking for rename... yes
checking for rindex... yes
checking for setenv... yes
checking for snprintf... yes
checking for sigsetmask... yes
checking for stpcpy... yes
checking for stpncpy... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strncasecmp... yes
checking for strndup... yes
checking for strnlen... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtod... yes
checking for strtol... yes
checking for strtoul... yes
checking for strverscmp... no
checking for tmpnam... yes
checking for vasprintf... yes
checking for vfprintf... yes
checking for vprintf... yes
checking for vsnprintf... yes
checking for vsprintf... yes
checking for waitpid... yes
checking for setproctitle... no
checking whether alloca needs Cray hooks... no
checking stack direction for C alloca... -1
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for _doprnt... no
checking for sys_errlist... yes
checking for sys_nerr... yes
checking for sys_siglist... yes
checking for external symbol _system_configuration... no
checking for __fsetlocking... no
checking for canonicalize_file_name... no
checking for dup3... no
checking for getrlimit... yes
checking for getrusage... yes
checking for getsysinfo... no
checking for gettimeofday... (cached) yes
checking for on_exit... no
checking for psignal... yes
checking for pstat_getdynamic... no
checking for pstat_getstatic... no
checking for realpath... yes
checking for setrlimit... yes
checking for sbrk... yes
checking for spawnve... no
checking for spawnvpe... no
checking for strerror... yes
checking for strsignal... yes
checking for sysconf... yes
checking for sysctl... yes
checking for sysmp... no
checking for table... no
checking for times... yes
checking for wait3... yes
checking for wait4... yes
checking whether basename is declared... no
checking whether ffs is declared... yes
checking whether asprintf is declared... yes
checking whether vasprintf is declared... yes
checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking whether calloc is declared... yes
checking whether getenv is declared... yes
checking whether getopt is declared... yes
checking whether malloc is declared... yes
checking whether realloc is declared... yes
checking whether sbrk is declared... yes
checking whether strverscmp is declared... no
checking whether canonicalize_file_name must be declared... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... yes
checking for working strncmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
dhcp297:build ibeekman$ make
cd libiberty/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make
if [ x"" != x ] && [ ! -d pic ]; then \
      mkdir pic; \
    else true; fi
touch stamp-picdir
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/regex.c -o pic/regex.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/regex.c -o regex.o
../../libiberty/regex.c: In function 'byte_regex_compile':
../../libiberty/regex.c:154:47: warning: right-hand operand of comma expression has no effect [-Wunused-value]
 #      define bzero(s, n) (memset (s, '\0', n), (s))
                                               ^
../../libiberty/regex.c:3126:13: note: in expansion of macro 'bzero'
             bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
             ^
../../libiberty/regex.c: In function 'byte_re_compile_fastmap':
../../libiberty/regex.c:154:47: warning: right-hand operand of comma expression has no effect [-Wunused-value]
 #      define bzero(s, n) (memset (s, '\0', n), (s))
                                               ^
../../libiberty/regex.c:4584:3: note: in expansion of macro 'bzero'
   bzero (fastmap, 1 << BYTEWIDTH);  /* Assume nothing's valid.  */
   ^
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/cplus-dem.c -o pic/cplus-dem.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/cplus-dem.c -o cplus-dem.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/cp-demangle.c -o pic/cp-demangle.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/cp-demangle.c -o cp-demangle.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/md5.c -o pic/md5.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/md5.c -o md5.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/sha1.c -o pic/sha1.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/sha1.c -o sha1.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/alloca.c -o pic/alloca.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/alloca.c -o alloca.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/argv.c -o pic/argv.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/argv.c -o argv.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/choose-temp.c -o pic/choose-temp.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/choose-temp.c -o choose-temp.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/concat.c -o pic/concat.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/concat.c -o concat.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/cp-demint.c -o pic/cp-demint.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/cp-demint.c -o cp-demint.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/crc32.c -o pic/crc32.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/crc32.c -o crc32.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/dwarfnames.c -o pic/dwarfnames.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/dwarfnames.c -o dwarfnames.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/dyn-string.c -o pic/dyn-string.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/dyn-string.c -o dyn-string.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/fdmatch.c -o pic/fdmatch.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/fdmatch.c -o fdmatch.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/fibheap.c -o pic/fibheap.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/fibheap.c -o fibheap.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/filename_cmp.c -o pic/filename_cmp.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/filename_cmp.c -o filename_cmp.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/floatformat.c -o pic/floatformat.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/floatformat.c -o floatformat.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/fnmatch.c -o pic/fnmatch.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/fnmatch.c -o fnmatch.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/fopen_unlocked.c -o pic/fopen_unlocked.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/fopen_unlocked.c -o fopen_unlocked.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/getopt.c -o pic/getopt.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/getopt.c -o getopt.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/getopt1.c -o pic/getopt1.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/getopt1.c -o getopt1.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/getpwd.c -o pic/getpwd.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/getpwd.c -o getpwd.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/getruntime.c -o pic/getruntime.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/getruntime.c -o getruntime.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/hashtab.c -o pic/hashtab.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/hashtab.c -o hashtab.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/hex.c -o pic/hex.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/hex.c -o hex.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/lbasename.c -o pic/lbasename.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/lbasename.c -o lbasename.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/lrealpath.c -o pic/lrealpath.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/lrealpath.c -o lrealpath.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/make-relative-prefix.c -o pic/make-relative-prefix.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/make-relative-prefix.c -o make-relative-prefix.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/make-temp-file.c -o pic/make-temp-file.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/make-temp-file.c -o make-temp-file.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/objalloc.c -o pic/objalloc.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/objalloc.c -o objalloc.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/obstack.c -o pic/obstack.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/obstack.c -o obstack.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/partition.c -o pic/partition.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/partition.c -o partition.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/pexecute.c -o pic/pexecute.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/pexecute.c -o pexecute.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/physmem.c -o pic/physmem.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/physmem.c -o physmem.o
In file included from /usr/include/sys/sysctl.h:83:0,
                 from ../../libiberty/physmem.c:52:
/usr/include/sys/ucred.h:93:8: note: struct defined here
 struct posix_cred {
        ^
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/pex-common.c -o pic/pex-common.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/pex-common.c -o pex-common.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/pex-one.c -o pic/pex-one.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/pex-one.c -o pex-one.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/pex-unix.c -o pic/pex-unix.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/pex-unix.c -o pex-unix.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/safe-ctype.c -o pic/safe-ctype.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/safe-ctype.c -o safe-ctype.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/simple-object.c -o pic/simple-object.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/simple-object.c -o simple-object.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/simple-object-coff.c -o pic/simple-object-coff.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/simple-object-coff.c -o simple-object-coff.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/simple-object-elf.c -o pic/simple-object-elf.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/simple-object-elf.c -o simple-object-elf.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/simple-object-mach-o.c -o pic/simple-object-mach-o.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/simple-object-mach-o.c -o simple-object-mach-o.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/simple-object-xcoff.c -o pic/simple-object-xcoff.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/simple-object-xcoff.c -o simple-object-xcoff.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/sort.c -o pic/sort.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/sort.c -o sort.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/spaces.c -o pic/spaces.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/spaces.c -o spaces.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/splay-tree.c -o pic/splay-tree.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/splay-tree.c -o splay-tree.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/stack-limit.c -o pic/stack-limit.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/stack-limit.c -o stack-limit.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/strerror.c -o pic/strerror.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/strerror.c -o strerror.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/strsignal.c -o pic/strsignal.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/strsignal.c -o strsignal.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/timeval-utils.c -o pic/timeval-utils.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/timeval-utils.c -o timeval-utils.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/unlink-if-ordinary.c -o pic/unlink-if-ordinary.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/unlink-if-ordinary.c -o unlink-if-ordinary.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/xatexit.c -o pic/xatexit.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/xatexit.c -o xatexit.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/xexit.c -o pic/xexit.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/xexit.c -o xexit.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/xmalloc.c -o pic/xmalloc.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/xmalloc.c -o xmalloc.o
../../libiberty/xmalloc.c: In function 'xmalloc_set_program_name':
../../libiberty/xmalloc.c:112:5: warning: 'sbrk' is deprecated [-Wdeprecated-declarations]
     first_break = (char *) sbrk (0);
     ^
In file included from ../../libiberty/xmalloc.c:81:0:
/usr/include/unistd.h:587:7: note: declared here
 void *sbrk(int);
       ^
../../libiberty/xmalloc.c: In function 'xmalloc_failed':
../../libiberty/xmalloc.c:124:5: warning: 'sbrk' is deprecated [-Wdeprecated-declarations]
     allocated = (char *) sbrk (0) - first_break;
     ^
In file included from ../../libiberty/xmalloc.c:81:0:
/usr/include/unistd.h:587:7: note: declared here
 void *sbrk(int);
       ^
../../libiberty/xmalloc.c:126:5: warning: 'sbrk' is deprecated [-Wdeprecated-declarations]
     allocated = (char *) sbrk (0) - (char *) &environ;
     ^
In file included from ../../libiberty/xmalloc.c:81:0:
/usr/include/unistd.h:587:7: note: declared here
 void *sbrk(int);
       ^
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/xmemdup.c -o pic/xmemdup.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/xmemdup.c -o xmemdup.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/xstrdup.c -o pic/xstrdup.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/xstrdup.c -o xstrdup.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/xstrerror.c -o pic/xstrerror.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/xstrerror.c -o xstrerror.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/xstrndup.c -o pic/xstrndup.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/xstrndup.c -o xstrndup.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/mempcpy.c -o pic/mempcpy.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/mempcpy.c -o mempcpy.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/strverscmp.c -o pic/strverscmp.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/strverscmp.c -o strverscmp.o
if [ x"" != x ]; then \
      gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../../libiberty/setproctitle.c -o pic/setproctitle.o; \
    else true; fi
gcc-5 -c -DHAVE_CONFIG_H -g -O2  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../libiberty/setproctitle.c -o setproctitle.o
rm -f ./libiberty.a pic/./libiberty.a
ar rc ./libiberty.a \
      ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./crc32.o ./dwarfnames.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./filename_cmp.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o ./safe-ctype.o ./simple-object.o ./simple-object-coff.o ./simple-object-elf.o ./simple-object-mach-o.o ./simple-object-xcoff.o ./sort.o ./spaces.o ./splay-tree.o ./stack-limit.o ./strerror.o ./strsignal.o ./timeval-utils.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o  ./mempcpy.o ./strverscmp.o ./setproctitle.o
ranlib ./libiberty.a
if [ x"" != x ]; then \
      cd pic; \
      ar rc ./libiberty.a \
        ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./crc32.o ./dwarfnames.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./filename_cmp.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o ./safe-ctype.o ./simple-object.o ./simple-object-coff.o ./simple-object-elf.o ./simple-object-mach-o.o ./simple-object-xcoff.o ./sort.o ./spaces.o ./splay-tree.o ./stack-limit.o ./strerror.o ./strsignal.o ./timeval-utils.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o  ./mempcpy.o ./strverscmp.o ./setproctitle.o; \
      ranlib ./libiberty.a; \
      cd ..; \
    else true; fi
echo ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./crc32.o ./dwarfnames.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./filename_cmp.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o ./safe-ctype.o ./simple-object.o ./simple-object-coff.o ./simple-object-elf.o ./simple-object-mach-o.o ./simple-object-xcoff.o ./sort.o ./spaces.o ./splay-tree.o ./stack-limit.o ./strerror.o ./strsignal.o ./timeval-utils.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o > required-list
make[2]: Nothing to be done for `all'.
: > libiberty.stmp
g++-5 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_CUGETERRORNAME=1 -DHAVE_CUGETERRORSTRING=1 -DHAVE_DECL_CUGETERRORNAME=1 -DHAVE_DECL_CUGETERRORSTRING=1  -DPKGVERSION="\"(nvptx-tools) \"" -DREPORT_BUGS_TO="\"<https://github.com/MentorEmbedded/nvptx-tools/issues>\"" -g -O2 -I../include \
        ../nvptx-as.c -o nvptx-none-as \
        -Llibiberty -liberty
../nvptx-as.c:31:18: fatal error: wait.h: No such file or directory
compilation terminated.
make: *** [nvptx-none-as] Error 1

config.log.txt

nvptx-as reorders ".file" directives

While filing https://gcc.gnu.org/PR82202, I noticed that nvptx-as reorders .file directives, for example compiling libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c with -fopenacc -O2 -foffload=nvptx-none='-save-temps -g' we got:

$ [...]/nvptx-none-as -o ccfEmvMv.s_ ccfEmvMv.s
$ diff -uw ccfEmvMv.s ccfEmvMv.s_
[...]
 // BEGIN FUNCTION DECL: main$_omp_fn$0
 .entry main$_omp_fn$0 (.param.u64 %in_ar0);
-
+.file 1 "source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c"
 // BEGIN FUNCTION DEF: main$_omp_fn$0
 .entry main$_omp_fn$0 (.param.u64 %in_ar0)
 {
@@ -46,7 +44,6 @@
        @%r54   bra     $L7;
                mov.u64 %r37, %ar0;
                mov.u32 %r36, %ctaid.x;
-       .file 1 "source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c"
        .loc 1 20 0
                shl.b32 %r39, %r36, 10;
                add.u32 %r40, %r39, %r36;

I don't think this is intentional?

[install]/nvptx-none/bin/{ar,as,ld,ranlib}

[install]/nvptx-none/bin/{ar,as,ld,ranlib} are currently created as (absolute) symlinks to the [install]/bin/nvptx-none-[...] files, which makes the installation tree non-relocatable to a different system.

help: gcc + openacc + nvidia dgup

This is more a help question rather than a issue

I have a Linux Fedora 38 system with a very old Nvidia GF119M [NVS 4200M] (rev a1)
The nvidia driver is installed and these packages are installed

gcc-13.2.1-4.fc38.x86_64
gcc-offload-nvptx-13.2.1-4.fc38.x86_64
libgomp-offload-nvptx-13.2.1-4.fc38.x86_64

xorg-x11-drv-nvidia-390xx-kmodsrc-390.157-2.fc38.x86_64
xorg-x11-drv-nvidia-390xx-libs-390.157-2.fc38.x86_64
xorg-x11-drv-nvidia-390xx-390.157-2.fc38.x86_64
xorg-x11-drv-nvidia-390xx-cuda-libs-390.157-2.fc38.x86_64
xorg-x11-drv-nvidia-390xx-cuda-390.157-2.fc38.x86_64
akmod-nvidia-390xx-390.157-5.fc38.x86_64
kmod-nvidia-390xx-6.5.8-200.fc38.x86_64-390.157-5.fc38.x86_64
kmod-nvidia-390xx-6.5.9-200.fc38.x86_64-390.157-5.fc38.x86_64
nvidia-persistenced-535.113.01-1.fc38.x86_64

Am I as is then able to compile C++ code with OpenAcc directives and produce a binary that can run code on CPU + GPU?

or is there more to install

I found https://gcc.gnu.org/wiki/OpenACC quite hard to read

libiberty

We're including a copy of libiberty.

There is an (apparently non-fatal) error during configuration:

[...]
checking whether byte ordering is bigendian... no
checking for a BSD-compatible install... /usr/bin/install -c
/bin/bash: [...]/source-nvptx-tools/libiberty/../move-if-change: No such file or directory
checking for sys/file.h... yes
checking for sys/param.h... yes
[...]

To remove code duplication, and under the assumption that we can probably use "more standard" interfaces than libiberty's, maybe it's not actually hard to get rid of libiberty altogether? (It has not yet been assessed which libiberty interfaces we're actually using.)

make nvptx-tools robust against cuda bugs

The purpose of the nvptx-tools is to test a gcc toolchain generating code for a single threaded ptx interpreter. The interpreter is provided by the cuda platform. Part of this platform is ptxas.

This is no ordinary assembler, but one with different optimization levels (-O0 ... -O4), and different code generators (-ori/-noori), and the task to insert the missing instructions and annotations handling the convergence stack (ssy, .s postfix). Consequently, ptxas can be less stable than you'd like for an assembler.

Nvptx-as.c calls ptxas with -O0. The purpose here is to do a minimal verification of the ptx validity. The output of ptxas is thrown away (so there's no great value in spending time optimizing the generated code), and the ptx is compiled again in nvptx-run.c (here using the cuda runtime functions rather than ptxas). The default optimization setting in nvptx-run.c though is -O4. Presumably the intention here is to achieve the fastest execution possible.

My observation is that while ptxas sigsegvs (and equivalent failures in nxptv-run) are of interest to nvidia, they are usually uninteresting from the point of view of gcc code generation.

Typically, when encountering such a sigsegv in the gcc test suite, we manually:

  • try different ptxas optimization levels
  • try different code generators
  • try different cuda versions

and if we find that the sigsegv goes away when changing any of those parameters, we conclude it's a cuda bug, and move on (perhaps by xfailing the testcase or some such).

I wonder if it makes sense to automate this:

  • let nvptx-as.c first try -O0, then -O0 -ori
  • let nvptx-run.c first try -O4, then -O4 -ori, then -O3, the -O3 -ori, etc (or some such)
    (assuming we can achieve the -ori equivalent using CUjit_option CU_JIT_NEW_SM3X_OPT)

This would reduce testsuite noise, save time, and reduce the number of xfails (and xpasses when running with different ptxas flags or cuda versions).

This could be implemented as the new default behaviour, or we could add a --fallback switch to nvptx-as.c and nvptx-run.c.

Eventually we could warn against using cuda versions which are known to be buggy to the point that that this fallback scenario doesn't help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.