https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88319

--- Comment #2 from doerthous <doerthous at 21cn dot com> ---
(In reply to doerthous from comment #1)
> Comfired on target: arm-linux-gnueabi with uclibc. gcc 11.2.0
> 
> 
> 
> It seems like libtool take the `-B' option as it's own option which is not
> recognized by libtool's option process.
> 
> # the option process loop in libtool script looks like: 
> case $opt in
>   --debug) #...;;
>   --mode) #...;;
>   -dlopen=*|--mode=*|--tag=*) #...;;
>   --help) #...;;
>   -*) func_fatal_help "unrecognized option \`$opt'" ;; # here raise the error
>   *) nonopt="$opt"
>   break
>   ;;
> esac
> 
> Is this a bug?
> 
> 
> 
> Error Info:
> 
> make[3]: Entering directory
> '/root/build/gcc-11.2.0/build_arm_s2/arm-linux-gnueabi/libitm'
> /bin/sh ./libtool  --tag=CXX   --mode=compile 
> -B/root/build/gcc-11.2.0/build_arm_s2/arm-linux-gnueabi/libstdc++-v3/src/.
> libs
> -B/root/build/gcc-11.2.0/build_arm_s2/arm-linux-gnueabi/libstdc++-v3/
> libsupc++/.libs -B/tmp/sysroot/arm/toolchain/arm-linux-gnueabi/bin/
> -B/tmp/sysroot/arm/toolchain/arm-linux-gnueabi/lib/ -isystem
> /tmp/sysroot/arm/toolchain/arm-linux-gnueabi/include -isystem
> /tmp/sysroot/arm/toolchain/arm-linux-gnueabi/sys-include
> --sysroot=/tmp/sysroot/arm   -DHAVE_CONFIG_H -I. -I../../../libitm 
> -I../../../libitm/config/linux/arm -I../../../libitm/config/linux
> -I../../../libitm/config/arm -I../../../libitm/config/posix
> -I../../../libitm/config/generic -I../../../libitm  -ftls-model=initial-exec
> -Wall -Werror  -Wc,-pthread  -std=gnu++0x -funwind-tables -fno-exceptions
> -fno-rtti -fabi-version=4 -g -O2 -D_GNU_SOURCE -MT aatree.lo -MD -MP -MF
> .deps/aatree.Tpo -c -o aatree.lo ../../../libitm/aatree.cc
> libtool: compile: unrecognized option
> `-B/root/build/gcc-11.2.0/build_arm_s2/arm-linux-gnueabi/libstdc++-v3/src/.
> libs'
> libtool: compile: Try `libtool --help' for more information.
> make[3]: *** [Makefile:678: aatree.lo] Error 1
> make[3]: Leaving directory
> '/root/build/gcc-11.2.0/build_arm_s2/arm-linux-gnueabi/libitm'
> make[2]: *** [Makefile:836: all-recursive] Error 1
> make[2]: Leaving directory
> '/root/build/gcc-11.2.0/build_arm_s2/arm-linux-gnueabi/libitm'
> make[1]: *** [Makefile:518: all] Error 2
> make[1]: Leaving directory
> '/root/build/gcc-11.2.0/build_arm_s2/arm-linux-gnueabi/libitm'
> make: *** [Makefile:17051: all-target-libitm] Error 2
> 
> 
> 
> Environment Info:
> 
> sh-5.1# uname -a
> Linux 0206568d6f54 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2
> 00:30:59 UTC 2022 x86_64 GNU/Linux
> sh-5.1# cat /etc/os-release
> NAME="Arch Linux"
> PRETTY_NAME="Arch Linux"
> ID=arch
> BUILD_ID=rolling
> VERSION_ID=TEMPLATE_VERSION_ID
> ANSI_COLOR="38;2;23;147;209"
> HOME_URL="https://archlinux.org/";
> DOCUMENTATION_URL="https://wiki.archlinux.org/";
> SUPPORT_URL="https://bbs.archlinux.org/";
> BUG_REPORT_URL="https://bugs.archlinux.org/";
> PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/";
> LOGO=archlinux-logo



Libtool Info:
sh-5.1# ./libtool --help
Usage: libtool [OPTION]... [MODE-ARG]...

Provide generalized library-building support services.

      --config             show all configuration variables
      --debug              enable verbose shell tracing
  -n, --dry-run            display commands without modifying any files
      --features           display basic configuration information and exit
      --mode=MODE          use operation mode MODE
      --no-finish          let install mode avoid finish commands
      --preserve-dup-deps  don't remove duplicate dependency libraries
      --quiet, --silent    don't print informational messages
      --no-quiet, --no-silent
                           print informational messages (default)
      --tag=TAG            use configuration variables from tag TAG
  -v, --verbose            print more informational messages than default
      --no-verbose         don't print the extra informational messages
      --version            print version information
  -h, --help, --help-all   print short, long, or detailed help message

MODE must be one of the following:

        clean              remove files from the build directory
        compile            compile a source file into a libtool object
        execute            automatically set library path, then run a program
        finish             complete the installation of libtool libraries
        install            install libraries or executables
        link               create a library or an executable
        uninstall          remove libraries from an installed directory

MODE-ARGS vary depending on the MODE.  When passed as first option,
`--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
Try `libtool --help --mode=MODE' for a more detailed description of MODE.

When reporting a bug, please describe a test case to reproduce it and
include the following information:

        host-triplet:   arm-unknown-linux-gnueabi
        shell:          /bin/sh
        compiler:                /root/build/gcc-11.2.0/build_arm_s2/./gcc/xgcc
-B/root/build/gcc-11.2.0/build_arm_s2/./gcc/
-B/tmp/sysroot/arm/toolchain/arm-linux-gnueabi/bin/
-B/tmp/sysroot/arm/toolchain/arm-linux-gnueabi/lib/ -isystem
/tmp/sysroot/arm/toolchain/arm-linux-gnueabi/include -isystem
/tmp/sysroot/arm/toolchain/arm-linux-gnueabi/sys-include
--sysroot=/tmp/sysroot/arm
        compiler flags:         -g -O2 -pthread
        linker:         /root/build/gcc-11.2.0/build_arm_s2/./gcc/collect-ld
(gnu? yes)
        libtool:        (GNU libtool 1.3134 2009-11-29) 2.2.7a
        automake:
        autoconf:

Report bugs to <bug-libt...@gnu.org>.

Reply via email to