# This file created by conda-build 24.5.2.dev35
# ------------------------------------------------

package:
  name: gcc_impl_linux-64
  version: 11.4.0
source:
  - patches:
      - patches/0021-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch
      - patches/old-allow-commands-in-main-specfile.patch
    sha256: af828619dd1970734dda3cfb792ea3f2cba61b5a00170ba8bce4910749d73c07
    url: https://ftp.gnu.org/gnu/gcc/gcc-11.4.0/gcc-11.4.0.tar.gz
build:
  detect_binary_files_with_prefix: false
  ignore_run_exports_from:
    - sysroot_linux-64
  missing_dso_whitelist:
    - '*'
  number: 13
  string: h00c12a0_13
requirements:
  host:
    - kernel-headers_linux-64 2.6.32 he073ed8_16
    - libgcc-ng 11.4.0 h77fa898_13
    - libgfortran5 >=11.4.0,<12.0a0
    - libgomp 11.4.0 h77fa898_13
    - libsanitizer 11.4.0 h5763a12_13
    - libstdcxx-ng 11.4.0 hc0a3c3a_13
    - sysroot_linux-64 2.12 he073ed8_16
  run:
    - binutils_impl_linux-64 >=2.40
    - libgcc-devel_linux-64 11.4.0 h8f596e0_113
    - libgcc-ng >=11.4.0
    - libgomp >=11.4.0
    - libsanitizer 11.4.0 h5763a12_13
    - libstdcxx-ng >=11.4.0
    - sysroot_linux-64
test:
  commands:
    - echo x86_64-conda_cos6-linux-gnu
    - echo sysroot
    - echo 2.12
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libgomp.so
    - test `readlink ${PREFIX}/x86_64-conda-linux-gnu/lib/libgomp.so` == "../../lib/libgomp.so"
    - test -f ${PREFIX}/bin/x86_64-conda_cos6-linux-gnu-gcc
    - test -f ${PREFIX}/bin/x86_64-conda_cos6-linux-gnu-cpp
    - test -f ${PREFIX}/bin/x86_64-conda-linux-gnu-gcc
    - test -f ${PREFIX}/bin/x86_64-conda-linux-gnu-cpp
    - test ! -f ${PREFIX}/bin/gcc
    - test ! -f ${PREFIX}/bin/cpp
    - CC=$(${PREFIX}/bin/*-gcc -dumpmachine)-gcc
    - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -Wl,-v -march=native
    - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -fsanitize=address
    - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v
    - ${CC} -Wall c_aligned.o -o c_aligned -v && ./c_aligned
    - ${CC} -Wall c_aligned.o -o c_aligned -Wl,-rpath,/foo && x86_64-conda-linux-gnu-readelf
      -d c_aligned | grep RPATH | grep "/foo:${PREFIX}/lib"
    - ${CC} -Wall tests/hello_world.c -c -o hello_world.o -v
    - ${CC} -Wall hello_world.o -o hello_world -v
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libgcc_s.so
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libsanitizer.spec
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libasan_preinit.o
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libgomp.spec
  files:
    - tests
  requires:
    - sysroot_linux-64 2.12.*
about:
  home: https://gcc.gnu.org/
  license: GPL-3.0-only WITH GCC-exception-3.1
  summary: GNU C Compiler
extra:
  copy_test_source_files: true
  feedstock-name: ctng-compilers-feedstock
  final: true
  flow_run_id: azure_20240623.2.1
  recipe-maintainers:
    - beckermr
    - isuruf
    - timsnyder
    - xhochy
  remote_url: https://github.com/conda-forge/ctng-compilers-feedstock
  sha: 65d04ebbfb4ff200a87ef5ed03b83e3bdbf5f31f
