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

package:
  name: gcc_impl_linux-64
  version: 12.2.0
source:
  - patches:
      - patches/0021-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch
      - patches/new-allow-commands-in-main-specfile.patch
    sha256: ac6b317eb4d25444d87cf29c0d141dedc1323a1833ec9995211b13e1a851261c
    url: https://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.gz
build:
  detect_binary_files_with_prefix: false
  ignore_run_exports:
    - __glibc
  missing_dso_whitelist:
    - '*'
  number: 19
  runpath_whitelist:
    - x86_64-conda-linux-gnu/sysroot/lib/libpthread-2.12.2.so
  string: hcc96c02_19
requirements:
  build:
    - binutils_impl_linux-64 2.39 h6ceecb4_0
    - gcc_bootstrap_linux-64 12.2.0 hba5b598_11
    - kernel-headers_linux-64 2.6.32 he073ed8_15
    - ld_impl_linux-64 2.39 hc81fddc_0
    - sysroot_linux-64 2.12 he073ed8_15
  host:
    - kernel-headers_linux-64 2.6.32 he073ed8_15
    - libgcc-ng 12.2.0 h65d4601_19
    - libgfortran5 >=12.2.0,<13.0a0
    - libgomp 12.2.0 h65d4601_19
    - libsanitizer 12.2.0 h46fd767_19
    - libstdcxx-ng 12.2.0 h46fd767_19
    - sysroot_linux-64 2.12 he073ed8_15
  run:
    - binutils_impl_linux-64 >=2.39
    - libgcc-devel_linux-64 12.2.0 h3b97bd3_19
    - libgcc-ng >=12.2.0
    - libgomp >=12.2.0
    - libsanitizer 12.2.0 h46fd767_19
    - libstdcxx-ng >=12.2.0
    - sysroot_linux-64
test:
  commands:
    - echo conda_cos6
    - 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 -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"
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libgcc_s.so
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libgomp.spec
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libsanitizer.spec
    - test -f ${PREFIX}/x86_64-conda-linux-gnu/lib/libasan_preinit.o
  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
  final: true
  recipe-maintainers:
    - beckermr
    - isuruf
    - timsnyder
    - xhochy
