Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When running Configure, clang and clang++ produce different results #17133

Closed
p5pRT opened this issue Aug 18, 2019 · 11 comments
Closed

When running Configure, clang and clang++ produce different results #17133

p5pRT opened this issue Aug 18, 2019 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 18, 2019

Migrated from rt.perl.org#134375 (status was 'open')

Searchable as RT134375$

@p5pRT
Copy link
Author

p5pRT commented Aug 18, 2019

From @jkeenan

[The following is probably relevant to
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134371, but I'm filing it
separately as it may be a more general problem.]

When I select '-Dcc=clang++', as distinct from '-Dcc=clang', ./Configure
produces different results. This difference appears to be independent
of both operating system and other configuration options.

Suppose first that I configure blead
(7654aaa, Aug 17 2019) on Linux as follows​:

#####
sh ./Configure -de -Dusedevel -Dcc=clang
#####

... and then record the output of ./Configure in a file.

Next, suppose I clean the checkout then reconfigure and re-record the
output as follows​:

#####
sh ./Configure -de -Dusedevel -Dcc=clang++
#####

Here are the compiler versions​:

#####
$ clang --version; clang++ --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target​: x86_64-pc-linux-gnu
Thread model​: posix
InstalledDir​: /usr/bin

clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target​: x86_64-pc-linux-gnu
Thread model​: posix
InstalledDir​: /usr/bin
#####

If I diff the two output files, I get several differences, but the
following appears to be most significant​:

#####
766c779,786
< I'll use gcvt to convert floats into a string.


gcvt oddity​: Expected 0.1, got 0.1
...But gcvt didn't work as I expected.
Trying sprintf...
sprintf() found.
sprintf oddity​: Expected 0.1, got 0.1
...But sprintf didn't work as I expected.
*** WHOA THERE!!! ***
None of ( gconvert gcvt sprintf) seemed to work properly. I'll use
sprintf.
#####

./Configure composes and runs a number of C programs on the fly as
probes. This file is typically named 'try.c'; the content of 'try.c' is
redefined several times during ./Configure. The relevant try.c starts
shortly after this comment at line 10370​: "​: Check how to convert floats
to strings." Within this C program we define a function called 'checkit()'.

#####
10429 int checkit(char *expect, char *got)
10430 {
10431 if (strcmp(expect, got)) {
10432 printf("%s oddity​: Expected %s, got %s\n",
10433 myname, expect, got);
10434 exit(1);
10435 }
10436 }
#####

Line 10432 above is the source of the surprising output above that I got
while configuring with clang++.

To answer one question in advance​: There is no leading or trailing
whitespace around '0.1'. I checked this by creating a branch in which I
put angle brackets around the last two instances of '%s' in the printf()
call above.

That implies that when running try.c, clang++ is calculating different
values for '*expect' and '*got' above line 10429. Moreover, clang++ is
getting different values both when calculating 'gcvt' and -- more
surprisingly -- when calculating 'sprintf'.

To answer another question in advance​: I don't get this difference when
compiling gcc versus g++.

Is this a bug in clang++? Or is it a bug in ./Configure?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Aug 18, 2019

From @jkeenan

Summary of my perl5 (revision 5 version 31 subversion 3) configuration​:
  Commit id​: 7654aaa
  Platform​:
  osname=linux
  osvers=4.15.0-58-generic
  archname=x86_64-linux
  uname='linux zareason 4.15.0-58-generic #64-ubuntu smp tue aug 6 11​:12​:41 utc 2019 x86_64 x86_64 x86_64 gnulinux '
  config_args='-de -Dusedevel -Dcc=clang++'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='clang++'
  ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
  optimize='-O2'
  cppflags='-I/usr/local/include'
  ccversion=''
  gccversion='4.2.1 Compatible Clang 6.0.0 (tags/RELEASE_600/final)'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='clang++'
  ldflags =' -L/usr/local/lib'
  libpth=/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
  libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.27.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.27'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  HAS_TIMES
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_USE_DEVEL
  USE_64_BIT_ALL
  USE_64_BIT_INT
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  Built under linux
  Compiled at Aug 18 2019 11​:00​:35
  %ENV​:
  PERL2DIR="/home/jkeenan/gitwork/perl2"
  PERLBREW_HOME="/home/jkeenan/.perlbrew"
  PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.30.0/man"
  PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin​:/home/jkeenan/perl5/perlbrew/perls/perl-5.30.0/bin"
  PERLBREW_PERL="perl-5.30.0"
  PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
  PERLBREW_SHELLRC_VERSION="0.84"
  PERLBREW_VERSION="0.84"
  PERL_WORKDIR="/home/jkeenan/gitwork/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.31.3/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.31.3
  /usr/local/lib/perl5/5.31.3/x86_64-linux
  /usr/local/lib/perl5/5.31.3

@p5pRT
Copy link
Author

p5pRT commented Aug 22, 2019

From @doughera88

On Sun, Aug 18, 2019 at 08​:04​:43AM -0700, James E Keenan (via RT) wrote​:

# New Ticket Created by James E Keenan
# Please include the string​: [perl #134375]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134375 >

[The following is probably relevant to
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134371, but I'm filing it
separately as it may be a more general problem.]

When I select '-Dcc=clang++', as distinct from '-Dcc=clang', ./Configure
produces different results. This difference appears to be independent
of both operating system and other configuration options.

Is this a bug in clang++? Or is it a bug in ./Configure?

It is a bug in Configure. The 'checkit()' program is declared to return
an integer, but actually returns nothing. (The return value is never used.)
This is undefined behavior in C++, but apparently not in C. See
  https://bugs.llvm.org/show_bug.cgi?id=43075
for a simple test case and explanation.

There are probably other such C vs. C++ bugs in Configure, including
possibly the detection of

  d_futimes
  d_lchown
  d_strtoll
  d_strtoul
  d_strtoull
  d_strtouq

I will leave this bug open as I work on those. Thank you for noticing
this issue in the first place!

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Aug 22, 2019

The RT System itself - Status changed from 'new' to 'open'

@jkeenan
Copy link
Contributor

jkeenan commented Dec 15, 2019

From @doughera88

On Sun, Aug 18, 2019 at 08​:04​:43AM -0700, James E Keenan (via RT) wrote​:

# New Ticket Created by James E Keenan
# Please include the string​: [perl #134375]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134375 >
[The following is probably relevant to
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134371, but I'm filing it
separately as it may be a more general problem.]
When I select '-Dcc=clang++', as distinct from '-Dcc=clang', ./Configure
produces different results. This difference appears to be independent
of both operating system and other configuration options.

Is this a bug in clang++? Or is it a bug in ./Configure?

It is a bug in Configure. The 'checkit()' program is declared to return
an integer, but actually returns nothing. (The return value is never used.)
This is undefined behavior in C++, but apparently not in C. See
https://bugs.llvm.org/show_bug.cgi?id=43075
for a simple test case and explanation.

There are probably other such C vs. C++ bugs in Configure, including
possibly the detection of

d_futimes
d_lchown
d_strtoll
d_strtoul
d_strtoull
d_strtouq

I will leave this bug open as I work on those. Thank you for noticing
this issue in the first place!

--
Andy Dougherty doughera@​lafayette.edu

On Dec 13 2019, Andy D. submitted 5 patches to ./Configure to the p5p mailing list. I created the smoke-me/jkeenan/andyd/configure-20191214 branch off blead and in turn applied each patch, configured with clang++, and then diff-ed the config.sh and config.h against the preceding versions of those files. Below are diffs of those files before the 5 patches and after those 5 patches.

$ diff -w --ignore-matching-lines='Configuration time:' \
    --ignore-matching-lines='cf_time=' config.0.sh config.5.sh
347c347
< d_lchown='undef'
---
> d_lchown='define'
589c589
< d_strtoll='undef'
---
> d_strtoll='define'
591,593c591,593
< d_strtoul='undef'
< d_strtoull='undef'
< d_strtouq='undef'
---
> d_strtoul='define'
> d_strtoull='define'
> d_strtouq='define'
$ diff -w --ignore-matching-lines='Configuration time:' \
    --ignore-matching-lines='cf_time=' config.0.h config.5.h
939c939
< /*#define HAS_LCHOWN		/ **/
---
> #define HAS_LCHOWN		/**/
1957c1957
< /*#define HAS_STRTOUL	/ **/
---
> #define HAS_STRTOUL	/**/
3391c3391
< /*#define HAS_STRTOLL		/ **/
---
> #define HAS_STRTOLL		/**/
3403c3403
< /*#define HAS_STRTOULL		/ **/
---
> #define HAS_STRTOULL		/**/
3409c3409
< /*#define HAS_STRTOUQ		/ **/
---
> #define HAS_STRTOUQ		/**/

I then configured in the branch -- i.e., after applying the 5 patches -- with clang and then clang++ and compared those outputs.

$ diff -w --ignore-matching-lines='Configuration time:' \
    --ignore-matching-lines='cf_time=' clang-config.5.sh clang++-config.5.sh
17c17
< config_args='-des -Dusedevel -Dcc=clang'
---
> config_args='-des -Dusedevel -Dcc=clang++'
21c21
< config_arg3='-Dcc=clang'
---
> config_arg3='-Dcc=clang++'
63c63
< cc='clang'
---
> cc='clang++'
66c66
< ccflags='-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
---
> ccflags='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
88c88
< cppflags='-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
---
> cppflags='-I/usr/local/include'
91,92c91,92
< cpprun='clang  -E'
< cppstdin='clang  -E'
---
> cpprun='clang++  -E'
> cppstdin='clang++  -E'
127,135c127,135
< d_attribute_always_inline='define'
< d_attribute_deprecated='define'
< d_attribute_format='define'
< d_attribute_malloc='define'
< d_attribute_nonnull='define'
< d_attribute_noreturn='define'
< d_attribute_pure='define'
< d_attribute_unused='define'
< d_attribute_warn_unused_result='define'
---
> d_attribute_always_inline='undef'
> d_attribute_deprecated='undef'
> d_attribute_format='undef'
> d_attribute_malloc='undef'
> d_attribute_nonnull='undef'
> d_attribute_noreturn='undef'
> d_attribute_pure='undef'
> d_attribute_unused='undef'
> d_attribute_warn_unused_result='undef'
158c158
< d_cplusplus='undef'
---
> d_cplusplus='define'
221c221
< d_fds_bits='undef'
---
> d_fds_bits='define'
431c431
< d_off64_t='undef'
---
> d_off64_t='define'
447c447
< d_printf_format_null='define'
---
> d_printf_format_null='undef'
653,654c653,654
< db_hashtype='u_int32_t'
< db_prefixtype='size_t'
---
> db_hashtype='int'
> db_prefixtype='int'
688c688
< extern_C='extern'
---
> extern_C='extern "C"'
843c843
< incpth='/usr/local/include /usr/lib/llvm-6.0/lib/clang/6.0.0/include /usr/include/x86_64-linux-gnu /usr/include'
---
> incpth='/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/include/clang/6.0.0/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include'
881c881
< ld='clang'
---
> ld='clang++'
883,884c883,884
< lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
< ldflags=' -fstack-protector-strong -L/usr/local/lib'
---
> lddlflags='-shared -O2 -L/usr/local/lib'
> ldflags=' -L/usr/local/lib'
891c891
< libpth='/usr/local/lib /usr/lib/llvm-6.0/lib/clang/6.0.0/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
---
> libpth='/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
896c896
< libspath=' /usr/local/lib /usr/lib/llvm-6.0/lib/clang/6.0.0/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
---
> libspath=' /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
1004c1004
< ranlib=':'
---
> ranlib='/usr/bin/ranlib'
$ diff -w --ignore-matching-lines='Configuration time:' \
    --ignore-matching-lines='cf_time=' clang-config.5.h clang++-config.5.h
1420c1420
< #define CPPSTDIN "clang  -E"
---
> #define CPPSTDIN "clang++  -E"
1422c1422
< #define CPPRUN "clang  -E"
---
> #define CPPRUN "clang++  -E"
1459,1468c1459,1468
< #define HASATTRIBUTE_DEPRECATED	/**/
< #define HASATTRIBUTE_FORMAT	/**/
< #define PRINTF_FORMAT_NULL_OK	/**/
< #define HASATTRIBUTE_NORETURN	/**/
< #define HASATTRIBUTE_MALLOC	/**/
< #define HASATTRIBUTE_NONNULL	/**/
< #define HASATTRIBUTE_PURE	/**/
< #define HASATTRIBUTE_UNUSED	/**/
< #define HASATTRIBUTE_WARN_UNUSED_RESULT	/**/
< #define HASATTRIBUTE_ALWAYS_INLINE	/**/
---
> /*#define HASATTRIBUTE_DEPRECATED	/ **/
> /*#define HASATTRIBUTE_FORMAT	/ **/
> /*#define PRINTF_FORMAT_NULL_OK	/ **/
> /*#define HASATTRIBUTE_NORETURN	/ **/
> /*#define HASATTRIBUTE_MALLOC	/ **/
> /*#define HASATTRIBUTE_NONNULL	/ **/
> /*#define HASATTRIBUTE_PURE	/ **/
> /*#define HASATTRIBUTE_UNUSED	/ **/
> /*#define HASATTRIBUTE_WARN_UNUSED_RESULT	/ **/
> /*#define HASATTRIBUTE_ALWAYS_INLINE	/ **/
2373c2373
< /*#define USE_CPLUSPLUS		/ **/
---
> #define USE_CPLUSPLUS		/**/
3113c3113
< /*#define	HAS_OFF64_T		/ **/
---
> #define	HAS_OFF64_T		/**/
3618,3619c3618,3619
< #define DB_Hash_t	u_int32_t		/**/
< #define DB_Prefix_t	size_t		/**/
---
> #define DB_Hash_t	int		/**/
> #define DB_Prefix_t	int		/**/

Thank you very much.
Jim Keenan

@jkeenan
Copy link
Contributor

jkeenan commented Dec 16, 2019

### From @doughera88
On Sun, Aug 18, 2019 at 08​:04​:43AM -0700, James E Keenan (via RT) wrote​:

# New Ticket Created by James E Keenan
# Please include the string​: [perl #134375]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134375 >
[The following is probably relevant to
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134371, but I'm filing it
separately as it may be a more general problem.]
When I select '-Dcc=clang++', as distinct from '-Dcc=clang', ./Configure
produces different results. This difference appears to be independent
of both operating system and other configuration options.

Is this a bug in clang++? Or is it a bug in ./Configure?

It is a bug in Configure. The 'checkit()' program is declared to return
an integer, but actually returns nothing. (The return value is never used.)
This is undefined behavior in C++, but apparently not in C. See
https://bugs.llvm.org/show_bug.cgi?id=43075
for a simple test case and explanation.
There are probably other such C vs. C++ bugs in Configure, including
possibly the detection of
d_futimes
d_lchown
d_strtoll
d_strtoul
d_strtoull
d_strtouq
I will leave this bug open as I work on those. Thank you for noticing
this issue in the first place!

Andy Dougherty doughera@​lafayette.edu

On Dec 13 2019, Andy D. submitted 5 patches to ./Configure to the p5p mailing list. I created the smoke-me/jkeenan/andyd/configure-20191214 branch off blead and in turn applied each patch, configured with clang++, and then diff-ed the config.sh and config.h against the preceding versions of those files. Below are diffs of those files before the 5 patches and after those 5 patches.

[snip]

I then configured in the branch -- i.e., after applying the 5 patches -- with clang and then clang++ and compared those outputs.

$ diff -w --ignore-matching-lines='Configuration time:' \
    --ignore-matching-lines='cf_time=' clang-config.5.sh clang++-config.5.sh
17c17
< config_args='-des -Dusedevel -Dcc=clang'
---
> config_args='-des -Dusedevel -Dcc=clang++'
21c21
< config_arg3='-Dcc=clang'
---
> config_arg3='-Dcc=clang++'
63c63
< cc='clang'
---
> cc='clang++'
66c66
< ccflags='-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
---
> ccflags='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
88c88
< cppflags='-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
---
> cppflags='-I/usr/local/include'
91,92c91,92
< cpprun='clang  -E'
< cppstdin='clang  -E'
---
> cpprun='clang++  -E'
> cppstdin='clang++  -E'
127,135c127,135
< d_attribute_always_inline='define'
< d_attribute_deprecated='define'
< d_attribute_format='define'
< d_attribute_malloc='define'
< d_attribute_nonnull='define'
< d_attribute_noreturn='define'
< d_attribute_pure='define'
< d_attribute_unused='define'
< d_attribute_warn_unused_result='define'
---
> d_attribute_always_inline='undef'
> d_attribute_deprecated='undef'
> d_attribute_format='undef'
> d_attribute_malloc='undef'
> d_attribute_nonnull='undef'
> d_attribute_noreturn='undef'
> d_attribute_pure='undef'
> d_attribute_unused='undef'
> d_attribute_warn_unused_result='undef'
158c158
< d_cplusplus='undef'
---
> d_cplusplus='define'
221c221
< d_fds_bits='undef'
---
> d_fds_bits='define'
431c431
< d_off64_t='undef'
---
> d_off64_t='define'
447c447
< d_printf_format_null='define'
---
> d_printf_format_null='undef'
653,654c653,654
< db_hashtype='u_int32_t'
< db_prefixtype='size_t'
---
> db_hashtype='int'
> db_prefixtype='int'
688c688
< extern_C='extern'
---
> extern_C='extern "C"'
843c843
< incpth='/usr/local/include /usr/lib/llvm-6.0/lib/clang/6.0.0/include /usr/include/x86_64-linux-gnu /usr/include'
---
> incpth='/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/include/clang/6.0.0/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include'
881c881
< ld='clang'
---
> ld='clang++'
883,884c883,884
< lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
< ldflags=' -fstack-protector-strong -L/usr/local/lib'
---
> lddlflags='-shared -O2 -L/usr/local/lib'
> ldflags=' -L/usr/local/lib'
891c891
< libpth='/usr/local/lib /usr/lib/llvm-6.0/lib/clang/6.0.0/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
---
> libpth='/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
896c896
< libspath=' /usr/local/lib /usr/lib/llvm-6.0/lib/clang/6.0.0/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
---
> libspath=' /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'
1004c1004
< ranlib=':'
---
> ranlib='/usr/bin/ranlib'
$ diff -w --ignore-matching-lines='Configuration time:' \
    --ignore-matching-lines='cf_time=' clang-config.5.h clang++-config.5.h
1420c1420
< #define CPPSTDIN "clang  -E"
---
> #define CPPSTDIN "clang++  -E"
1422c1422
< #define CPPRUN "clang  -E"
---
> #define CPPRUN "clang++  -E"
1459,1468c1459,1468
< #define HASATTRIBUTE_DEPRECATED	/**/
< #define HASATTRIBUTE_FORMAT	/**/
< #define PRINTF_FORMAT_NULL_OK	/**/
< #define HASATTRIBUTE_NORETURN	/**/
< #define HASATTRIBUTE_MALLOC	/**/
< #define HASATTRIBUTE_NONNULL	/**/
< #define HASATTRIBUTE_PURE	/**/
< #define HASATTRIBUTE_UNUSED	/**/
< #define HASATTRIBUTE_WARN_UNUSED_RESULT	/**/
< #define HASATTRIBUTE_ALWAYS_INLINE	/**/
---
> /*#define HASATTRIBUTE_DEPRECATED	/ **/
> /*#define HASATTRIBUTE_FORMAT	/ **/
> /*#define PRINTF_FORMAT_NULL_OK	/ **/
> /*#define HASATTRIBUTE_NORETURN	/ **/
> /*#define HASATTRIBUTE_MALLOC	/ **/
> /*#define HASATTRIBUTE_NONNULL	/ **/
> /*#define HASATTRIBUTE_PURE	/ **/
> /*#define HASATTRIBUTE_UNUSED	/ **/
> /*#define HASATTRIBUTE_WARN_UNUSED_RESULT	/ **/
> /*#define HASATTRIBUTE_ALWAYS_INLINE	/ **/
2373c2373
< /*#define USE_CPLUSPLUS		/ **/
---
> #define USE_CPLUSPLUS		/**/
3113c3113
< /*#define	HAS_OFF64_T		/ **/
---
> #define	HAS_OFF64_T		/**/
3618,3619c3618,3619
< #define DB_Hash_t	u_int32_t		/**/
< #define DB_Prefix_t	size_t		/**/
---
> #define DB_Hash_t	int		/**/
> #define DB_Prefix_t	int		/**/

Andy (@doughera88), are these differences between the results of configuration with clang and clang++, respectively, those that you would expect to remain after applying your five patches (as, e.g., in the smoke-me/jkeenan/andyd/configure-20191214 branch)?

If so, then I think we should apply those to blead and then (@Tux) apply them to metaconfig. Smoke-test results are satisfactory (i.e., no new failures caused by these patches).

Another way of asking the same question: Can you list those problematic configuration differences that these patches resolve and those that you are still working on?

Thank you very much.
Jim Keenan

@doughera88
Copy link
Contributor

doughera88 commented Dec 29, 2019 via email

@jkeenan jkeenan self-assigned this Dec 30, 2019
@jkeenan
Copy link
Contributor

jkeenan commented Dec 30, 2019

[snip]
I've applied the patches to blead. I am not currently working on any other related issues, so this ticket can be closed. Thank you for following up on this,

-- Andy Dougherty doughera@lafayette.edu

Thanks. I've taken the ticket for purpose of closing it after watching smoke test results.

@Tux , @arc, @khwilliamson Can you apply these to metaconfig?

Thank you very much.
Jim Keenan

@doughera88
Copy link
Contributor

doughera88 commented Dec 30, 2019 via email

@doughera88
Copy link
Contributor

doughera88 commented Dec 31, 2019 via email

@jkeenan
Copy link
Contributor

jkeenan commented Jan 28, 2020

Changes needed in blead were pushed by @doughera88 on Dec 29 2019. Closing ticket. Thank you very much.

@jkeenan jkeenan closed this as completed Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants