]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltmain.in: Update info supplied to user for --tag usage
authorIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Sat, 4 Jan 2025 12:53:13 +0000 (14:53 +0200)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Tue, 7 Jan 2025 18:56:37 +0000 (20:56 +0200)
* build-aux/ltmain.in: Make error message more explicit for users,
  and add tag name information to help menu.
* tests/infer-tag.at: Add testcase for unsupported compiler use.

build-aux/ltmain.in
tests/infer-tag.at

index 8c48f14bff5820c3d6a3b8281f3feaf8eb641a74..61266d20aa9047cb078e6e4a51ca421074b9ed67 100644 (file)
@@ -149,6 +149,20 @@ func_help ()
     func_usage_message
     $ECHO "$long_help_message
 
+If a TAG is supplied, it must use one of the tag names below:
+
+    Tag Name        Language Name
+       CC              C
+       CXX             C++
+       GCJ             Java
+       F77             Fortran 77
+       FC              Fortran
+       GO              Go
+       RC              Windows Resource
+
+If you do not see a tag name associated with your programming language, then
+you are using a compiler that $progname does not support.
+
 MODE must be one of the following:
 
        clean           remove files from the build directory
@@ -849,8 +863,9 @@ func_infer_tag ()
        # was found and let the user know that the "--tag" command
        # line option must be used.
        if test -z "$tagname"; then
-         func_echo "unable to infer tagged configuration"
-         func_fatal_error "specify a tag with '--tag'"
+         func_echo "unable to infer tagged configuration with compiler."
+         func_echo "Possible use of unsupported compiler."
+         func_fatal_error "specify a tag with '--tag'. For more information, try '$progname --help'."
 #      else
 #        func_verbose "using $tagname tagged configuration"
        fi
index 079bf7a89c57b2b1e8392dac981e37b17b729b7f..2f4e67778e38850a68a117b4b64f31147c34b527 100644 (file)
@@ -93,3 +93,20 @@ AT_CHECK([$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java],
         [], [ignore], [ignore])
 
 AT_CLEANUP
+
+# Unsupported compiler check
+AT_SETUP([Unsupported compiler inferred tag check])
+AT_KEYWORDS([libtool])
+
+AT_DATA([a.asm],
+[[section .text
+     global _start
+  _start:
+     mov eax,1
+]])
+
+AT_XFAIL_IF([:])
+AT_CHECK([$LIBTOOL --mode=compile nasm -felf64 a.asm],
+        [0], [ignore], [ignore])
+
+AT_CLEANUP