Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-982

CPPOPTS, CXXOPTS and LDOPTS aren't used in etc/config/src/libc_decl.sh

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 4.2.0, 4.2.1
    • 4.2.2
    • Configuration
    • None
    • Ubuntu Linux, Cygwin, MinGW

    • Incorrect Behavior

    Description

      On Cygwin it's possible to build library in two modes:
      1) with using cygwin1.dll (POSIX compatibility layer)
      2) without using cygwin1.dll - the same result as if you're using MinGW compiler

      For building library in MinGW mode the compiler and linker options should be extended with -mno-cygwin option.

      I've tried to use CPPOPTS, CXXOPTS and LDOPTS make variables, described in README file:

      $ make builddir BUILDDIR=mingw15s BUILDTYPE=15s CONFIG=gcc.config CXXOPTS=-mno-cygwin LDOPTS=-mno-cygwin
      $ cd mingw15s/include && make CXXOPTS=-mno-cygwin LDOPTS=-mno-cygwin
      

      The config.log file shows that -mno-cygwin option is used only once at linking stage of the sanity test:

      int main () { return 0; }
      gcc -D_RWSTDDEBUG -D_REENTRANT -mthreads -I. -pedantic -nostdinc++ -g   -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  -c a.cpp -o a.o
      gcc a.o -mthreads  -mno-cygwin -lm -lsupc++ -lcatgets -liconv  -o a.out
      int main () { return sizeof (int); }
      
      int main () { return sizeof (long); }
      
      int main () { return sizeof (long long); }
      
      int main () { return sizeof (void*); }
      
      int main () { int i = 1; return *(char*)&i; }
      
      gcc -E  -D_RWSTDDEBUG -D_REENTRANT -mthreads -pedantic -nostdinc++ -g   /tmp/assert-2408.cpp >/tmp/assert-2408.i
      /tmp/assert-2408.cpp:1:19: cassert: No such file or directory
      gcc -E  -D_RWSTDDEBUG -D_REENTRANT -mthreads -pedantic -nostdinc++ -g   /tmp/assert-2408.cpp >/tmp/assert-2408.i
      ...
      

      The same effect observing on Ubuntu Linux.

      Attachments

        Activity

          People

            Unassigned Unassigned
            farid Farid Zaripov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Time Spent - 10m Remaining Estimate - 1h 50m
                1h 50m
                Logged:
                Time Spent - 10m Remaining Estimate - 1h 50m
                10m