[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] Building gcc-x[ada] with gcc-y[ada]
From:       Alfredo Tupone <tupone () gentoo ! org>
Date:       2022-10-22 21:42:12
Message-ID: 20221022234212.20d293bc () alfredo ! tupone ! it
[Download RAW message or body]

I knew that building gcc+ada with an already bootstrapped gcc[ada] is
not supported if you build an older compiler:

like you cannot emerge gcc-10.4.0[ada] using gcc-12.2.0[ada]

I would like to warn the user (and possibly disable ada? ). 

I tried this on my local PC 

 toolchain_pkg_pretend() {
        if ! _tc_use_if_iuse cxx ; then
                _tc_use_if_iuse go && \
                        ewarn 'Go requires a C++ compiler, disabled due  to \
                USE="-cxx"' _tc_use_if_iuse objc++ && \
                        ewarn 'Obj-C++ requires a C++ compiler,  disabled due to \
                USE="-cxx"' _tc_use_if_iuse gcj && \
                        ewarn 'GCJ requires a C++ compiler, disabled  due to \
USE="-cxx"'   fi
 
+       if _tc_use_if_iuse ada ; then
+               local version=$($(tc-getCC) -dumpversion)
+               if $(ver_test ${version} -gt ${GCC_CONFIG_VER}); then
+                       ewarn 'Ada require an older compiler'
+                       ewarn "You are building ${GCC_CONFIG_VER} with ${version}"
+               fi
+       fi

        want_minispecs
 }

I don't know if this code breaks other things, if it works everywhere
...

Please comment 

Alfredo


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic