]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
New Intel OneAPI compiler names
authorIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Sat, 9 Aug 2025 11:22:47 +0000 (14:22 +0300)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Sat, 6 Sep 2025 11:25:42 +0000 (14:25 +0300)
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78817

* libltdl/libltdl/lt__alloc.h: Change FREE and MEMREASSIGN macros for
  -Wcompound-token-split-by-macro.
* libltdl/libltdl/lt_system.h: Change LT_STMT_START and LT_STMT_END
  macros for -Wcompound-token-split-by-macro.
* libltdl/loaders/loadlibrary.c: Add support for icx, icpx, ifx.
* libltdl/ltdl.c: Fixes for Clang.
* m4/libtool.m4: Add support for icx, icpx, and ifx.
* NEWS: Update.

NEWS
libltdl/libltdl/lt__alloc.h
libltdl/libltdl/lt_system.h
libltdl/loaders/loadlibrary.c
libltdl/ltdl.c
m4/libtool.m4

diff --git a/NEWS b/NEWS
index e7169270e48afa12007f7fcb045ab6671881cb4b..b167fd74b74478c98a7c9ceae5aa1ae781e40655 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,10 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
   - Fix libltdl early failures for multi-arch.
 
+** Changes in supported systems or compilers:
+
+  - Support additional Intel OneAPI compilers, 'icx', 'icpx', and 'ifx'.
+
 
 * Noteworthy changes in release 2.5.4 (2024-11-20) [stable]
 
index f27345b1d2f2438095840a12fadb1dd013e62316..ad25e30eea6451e83806d8155d8c549ad8f97ee5 100644 (file)
@@ -35,11 +35,11 @@ LT_BEGIN_C_DECLS
 
 #define MALLOC(tp, n)          (tp*) lt__malloc((n) * sizeof(tp))
 #define REALLOC(tp, mem, n)    (tp*) lt__realloc((mem), (n) * sizeof(tp))
-#define FREE(mem)                              LT_STMT_START \
-       free (mem); mem = NULL;                                 LT_STMT_END
-#define MEMREASSIGN(p, q)                      LT_STMT_START \
+#define FREE(mem)                              LT_STMT_START \
+       free (mem); mem = NULL;                                 LT_STMT_END
+#define MEMREASSIGN(p, q)                      LT_STMT_START \
        if ((p) != (q)) { free (p); (p) = (q); (q) = 0; }       \
-                                                               LT_STMT_END
+                                                               LT_STMT_END
 
 /* If set, this function is called when memory allocation has failed.  */
 LT_SCOPE void (*lt__alloc_die) (void);
index 15346858d3833f7c6e9fb790e4ee2310192bda37..2f2c7b77453b44c275ebb233b3dc177c6b0efc74 100644 (file)
@@ -62,15 +62,15 @@ License along with GNU Libltdl.  If not, see <https://www.gnu.org/licenses/>.
 /* LT_STMT_START/END are used to create macros that expand to a
    a single compound statement in a portable way.  */
 #if defined  __GNUC__ && !defined  __STRICT_ANSI__ && !defined  __cplusplus
-#  define LT_STMT_START        (void)(
-#  define LT_STMT_END          )
+#  define LT_STMT_START        (void)({
+#  define LT_STMT_END          })
 #else
 #  if (defined sun || defined __sun__)
-#    define LT_STMT_START      if (1)
-#    define LT_STMT_END        else (void)0
+#    define LT_STMT_START      if (1){
+#    define LT_STMT_END        }else (void)0
 #  else
-#    define LT_STMT_START      do
-#    define LT_STMT_END        while (0)
+#    define LT_STMT_START      do{
+#    define LT_STMT_END        }while (0)
 #  endif
 #endif
 
index e1176bd7b4275e1803d06d7628d2883919e29376..d62dce5b952dc12982963fcb8a8f2f656676ec33 100644 (file)
@@ -95,8 +95,8 @@ get_vtable (lt_user_data loader_data)
 
 #include <windows.h>
 
-#define LOCALFREE(mem)                                      LT_STMT_START \
-       if (mem) { LocalFree ((void *)mem); mem = NULL; }    LT_STMT_END
+#define LOCALFREE(mem)                                      LT_STMT_START \
+       if (mem) { LocalFree ((void *)mem); mem = NULL; }    LT_STMT_END
 #define LOADLIB__SETERROR(errmsg) LT__SETERRORSTR (loadlibraryerror (errmsg))
 #define LOADLIB_SETERROR(errcode) LOADLIB__SETERROR (LT__STRERROR (errcode))
 
index 60495415230241aed36d9bd315511e36c4f1777a..85bd6013ba14961291bd0298e50d2d53068bdc50 100644 (file)
@@ -1367,9 +1367,12 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
            }
 #endif
 #if defined LT_DLSEARCH_PATH
-         if (!file && *sys_dlsearch_path)
+         if (!file)
            {
-             file = find_file (sys_dlsearch_path, base_name, &dir);
+             if (*sys_dlsearch_path)
+               {
+                 file = find_file (sys_dlsearch_path, base_name, &dir);
+               }
            }
 #endif
        }
@@ -1916,24 +1919,27 @@ lt_dlforeachfile (const char *search_path,
       is_done = foreach_dirinpath (user_search_path, 0,
                                   foreachfile_callback, fpptr, data);
       if (!is_done)
-       {
-         is_done = foreach_dirinpath (getenv(LTDL_SEARCHPATH_VAR), 0,
+             {
+               is_done = foreach_dirinpath (getenv(LTDL_SEARCHPATH_VAR), 0,
                                       foreachfile_callback, fpptr, data);
-       }
+             }
 
 #if defined LT_MODULE_PATH_VAR
       if (!is_done)
-       {
-         is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0,
-                                      foreachfile_callback, fpptr, data);
-       }
+      {
+          is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0,
+               foreachfile_callback, fpptr, data);
+      }
 #endif
 #if defined LT_DLSEARCH_PATH
-      if (!is_done && *sys_dlsearch_path)
-       {
-         is_done = foreach_dirinpath (sys_dlsearch_path, 0,
-                                      foreachfile_callback, fpptr, data);
-       }
+      if (!is_done)
+             {
+          if (*sys_dlsearch_path)
+            {
+              is_done = foreach_dirinpath (sys_dlsearch_path, 0,
+                   foreachfile_callback, fpptr, data);
+            }
+        }
 #endif
     }
 
index ffc8a3e1903e6458e7cfd4b7ce5776b3fab9399d..cb86980920188a9377a7f703be79db1b62e67359 100644 (file)
@@ -2668,8 +2668,8 @@ m4_if([$1], [],[
     dynamic_linker='Win32 ld.exe'
     ;;
 
-  *,cl* | *,icl*)
-    # Native MSVC or ICC
+  *,cl* | *,icl* | *,icx*)
+    # Native MSVC and Intel compilers
     libname_spec='$name'
     soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
     library_names_spec='$libname.dll.lib'
@@ -4558,7 +4558,7 @@ m4_if([$1], [CXX], [
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
            ;;
-         icpc* )
+         icpc* | icpx*)
            # Intel C++, used to be incompatible with GCC.
            # ICC 10 doesn't accept -KPIC any more.
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4893,7 +4893,7 @@ m4_if([$1], [CXX], [
         ;;
       # icc used to be incompatible with GCC.
       # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
+      icc* | ifort* | icx* | ifx*)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -5129,7 +5129,8 @@ m4_if([$1], [CXX], [
     ;;
   cygwin* | mingw* | windows* | cegcc*)
     case $cc_basename in
-    cl* | icl*)
+    cl* | icl* | icx* | icpx*)
+      # Native MSVC and Intel compilers
       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
       ;;
     *)
@@ -5404,7 +5405,7 @@ _LT_EOF
          tmp_addflag=' -i_dynamic' ;;
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
          tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
+       ifc* | ifort* | ifx*)           # Intel Fortran compiler
          tmp_addflag=' -nofor_main' ;;
        lf95*)                          # Lahey Fortran 8.1
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
@@ -5767,8 +5768,8 @@ _LT_EOF
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       case $cc_basename in
-      cl* | icl*)
-       # Native MSVC or ICC
+      cl* | icl* | icx* | icpx*)
+       # Native MSVC and Intel compilers
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
        _LT_TAGVAR(always_export_symbols, $1)=yes
@@ -6851,8 +6852,8 @@ if test yes != "$_lt_caught_CXX_error"; then
 
       cygwin* | mingw* | windows* | pw32* | cegcc*)
        case $GXX,$cc_basename in
-       ,cl* | no,cl* | ,icl* | no,icl*)
-         # Native MSVC or ICC
+       ,cl* | no,cl* | ,icl* | no,icl* | ,icx* | no,icx* | ,icpx* | no,icpx*)
+         # Native MSVC and Intel compilers
          # hardcode_libdir_flag_spec is actually meaningless, as there is
          # no search path for DLLs.
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -7186,7 +7187,7 @@ if test yes != "$_lt_caught_CXX_error"; then
            # "CC -Bstatic", where "CC" is the KAI C++ compiler.
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
            ;;
-         icpc* | ecpc* )
+         icpc* | ecpc* | icpx*)
            # Intel C++
            with_gnu_ld=yes
            # version 8.0 and above of icpc choke on multiply defined symbols