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

package:
  name: gcc_impl_linux-64
  version: 14.1.0
source:
  - patches:
      - patches/0002-allow-commands-in-main-specfile.patch
      - patches/0003-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch
      - patches/0004-add-ldl-to-libstdc___la_LDFLAGS.patch
      - patches/0005-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch
    sha256: a0be066c02775002a0fa65ad3c65fb56a8bfd923d072a26ed148c0439ecdb68f
    url: https://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.gz
build:
  detect_binary_files_with_prefix: false
  ignore_run_exports_from:
    - sysroot_linux-64
  missing_dso_whitelist:
    - '*'
  number: 1
  string: h3c94d91_1
requirements:
  host:
    - kernel-headers_linux-64 2.6.32 he073ed8_16
    - libgcc 14.1.0 h77fa898_1
    - libgfortran5 >=14.1.0,<15.0a0
    - libgomp 14.1.0 h77fa898_1
    - libsanitizer 14.1.0 hcba0ae0_1
    - libstdcxx 14.1.0 hc0a3c3a_1
    - sysroot_linux-64 2.12 he073ed8_16
  run:
    - binutils_impl_linux-64 >=2.40
    - libgcc >=14.1.0
    - libgcc-devel_linux-64 14.1.0 h5d3d1c9_101
    - libgomp >=14.1.0
    - libsanitizer 14.1.0 hcba0ae0_1
    - libstdcxx >=14.1.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_20240827.1.1
  recipe-maintainers:
    - beckermr
    - isuruf
    - timsnyder
    - xhochy
  remote_url: https://github.com/conda-forge/ctng-compilers-feedstock
  sha: 8853ee7c0d15a9a73b35503c384f5894cf38c379
