# This file created by conda-build 26.3.0
# ------------------------------------------------

package:
  name: gcc_impl_linux-64
  version: 13.4.0
source:
  - url:
      - https://mirrors.ocf.berkeley.edu/gnu/gcc/gcc-13.4.0/gcc-13.4.0.tar.gz
    sha256: bf0baf3e570c9c74c17c8201f0196c6924b4bd98c90e69d6b2ac0cd823f33bbc
    patches:
      - patches/0001-allow-commands-in-main-specfile.patch
      - patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch
  - url: https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz
    sha256: 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
    folder: zlib2
build:
  number: 19
  detect_binary_files_with_prefix: false
  missing_dso_whitelist:
    - '*'
  ignore_run_exports_from:
    - sysroot_linux-64
  string: h23e9d51_19
requirements:
  host:
    - kernel-headers_linux-64 3.10.0 he581ecd_18
    - libgcc 13.4.0 he0feb66_19
    - libgcc-devel_linux-64 13.4.0 hd1d28cc_119
    - libgfortran5 >=13.4.0,<14.0a0
    - libgomp 13.4.0 he0feb66_19
    - libsanitizer 13.4.0 h2a15e64_19
    - libstdcxx 13.4.0 h934c35e_19
    - sysroot_linux-64 2.17 hb09d241_18
    - tzdata 2025c hc9c84f9_1
  run:
    - binutils_impl_linux-64 >=2.45
    - libgcc >=13.4.0
    - libgcc-devel_linux-64 13.4.0 hd1d28cc_119
    - libgomp >=13.4.0
    - libsanitizer 13.4.0 h2a15e64_19
    - libstdcxx >=13.4.0
    - libstdcxx-devel_linux-64 13.4.0 h6963c3b_119
    - sysroot_linux-64
test:
  requires:
    - sysroot_linux-64 2.17.*
  files:
    - tests
  commands:
    - echo sysroot
    - echo 2.17
    - test -f ${PREFIX}/lib/gcc/x86_64-conda-linux-gnu/13.4.0/libgomp.so
    - test `readlink ${PREFIX}/lib/gcc/x86_64-conda-linux-gnu/13.4.0/libgomp.so` ==
      "../../../libgomp.so"
    - 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}/lib/gcc/x86_64-conda-linux-gnu/13.4.0/libgcc_s.so
    - test -f ${PREFIX}/lib/gcc/x86_64-conda-linux-gnu/13.4.0/libsanitizer.spec
    - test -f ${PREFIX}/lib/gcc/x86_64-conda-linux-gnu/13.4.0/libasan_preinit.o
    - test -f ${PREFIX}/lib/gcc/x86_64-conda-linux-gnu/13.4.0/libgomp.spec
about:
  summary: GNU C Compiler
  home: https://gcc.gnu.org/
  license: GPL-3.0-only WITH GCC-exception-3.1
extra:
  feedstock-name: ctng-compilers-feedstock
  recipe-maintainers:
    - beckermr
    - isuruf
    - timsnyder
    - xhochy
  final: true
  copy_test_source_files: true
  flow_run_id: azure_20260508.3.1
  remote_url: https://github.com/conda-forge/ctng-compilers-feedstock
  sha: 56d1f0049683ead04fe3ed3276d698dbaacac230
