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

package:
  name: gcc_impl_linux-64
  version: 15.2.0
source:
  - url:
      - https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz
      - https://mirrors.ocf.berkeley.edu/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz
    sha256: 7294d65cc1a0558cb815af0ca8c7763d86f7a31199794ede3f630c0d1b0a5723
    patches:
      - patches/0001-allow-commands-in-main-specfile.patch
      - patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch
      - patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch
      - patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch
build:
  number: 7
  detect_binary_files_with_prefix: false
  missing_dso_whitelist:
    - '*'
  ignore_run_exports_from:
    - sysroot_linux-64
  string: hcacfade_7
requirements:
  host:
    - kernel-headers_linux-64 3.10.0 he581ecd_18
    - libgcc 15.2.0 h767d61c_7
    - libgfortran5 >=15.2.0,<16.0a0
    - libgomp 15.2.0 h767d61c_7
    - libsanitizer 15.2.0 hb13aed2_7
    - libstdcxx 15.2.0 h8f9b012_7
    - sysroot_linux-64 2.17 hb09d241_18
    - tzdata 2025b h78e105d_0
  run:
    - binutils_impl_linux-64 >=2.40
    - libgcc >=15.2.0
    - libgcc-devel_linux-64 15.2.0 h73f6952_107
    - libgomp >=15.2.0
    - libsanitizer 15.2.0 hb13aed2_7
    - libstdcxx >=15.2.0
    - sysroot_linux-64
test:
  requires:
    - sysroot_linux-64 2.17.*
  files:
    - tests
  commands:
    - echo sysroot
    - echo 2.17
    - 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-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
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_20251008.2.1
  remote_url: https://github.com/conda-forge/ctng-compilers-feedstock
  sha: 75d69d32b4266eef9808c20157cc4af1ef9705ca
