尊敬的guoge总,

昨天在fedora社区,看到Clang的版本同步信息(fedora 10.0.0.2 rc),实在是感动,和您的团队在openEuler的规划一致。特别汇报。

【测试】
[root@192 ~]# pwd
/root
[root@192 ~]# vim test.com
[root@192 ~]# vim test.c
[root@192 ~]# clang test.c
test.c:4:15: warning: data argument not used by format string [-Wformat-extra-args]
printf("1+2=",1+2,"\n");
       ~~~~~~ ^
1 warning generated.
[root@192 ~]# ./a.out
Hello Clang World!
1+2=[root@192 ~]# vim test.c
[root@192 ~]# clang test.c
test.c:4:21: warning: data argument not used by format string [-Wformat-extra-args]
printf("1+2=%d",1+2,"\n");
       ~~~~~~~~     ^
1 warning generated.
[root@192 ~]# ./a.out
Hello Clang World!
1+2=3[root@192 ~]# vim test.c
[root@192 ~]# clang test.c
[root@192 ~]# ./a.out
Hello Clang World!
1+2=3
[root@192 ~]# clang --version
clang version 10.0.0 (Fedora 10.0.0-2.fc32)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
[root@192 ~]#

【安装】
[jeremiah@192 ~]$ su
Password:
su: Authentication failure
[jeremiah@192 ~]$ yum install clang
Error: This command has to be run with superuser privileges (under the root user on most systems).
[jeremiah@192 ~]$ sudo yum install clang
 
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
 
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
 
[sudo] password for jeremiah:
Last metadata expiration check: 0:17:13 ago on Wed 16 Sep 2020 06:02:18 PM CST.
Dependencies resolved.
================================================================================
 Package                 Architecture Version               Repository     Size
================================================================================
Installing:
 clang                   x86_64       10.0.0-2.fc32         updates        86 k
Installing dependencies:
 clang-devel             x86_64       10.0.0-2.fc32         updates       1.7 M
 clang-libs              x86_64       10.0.0-2.fc32         updates        24 M
 clang-tools-extra       x86_64       10.0.0-2.fc32         updates        13 M
 cmake-filesystem        x86_64       3.17.4-1.fc32         updates        15 k
Installing weak dependencies:
 compiler-rt             x86_64       10.0.0-1.fc32         fedora        1.9 M
 libomp                  x86_64       10.0.0-1.fc32         fedora        363 k
 libomp-devel            x86_64       10.0.0-1.fc32         fedora         17 k
 
Transaction Summary
================================================================================
Install  8 Packages
 
Total download size: 41 M
Installed size: 184 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): clang-10.0.0-2.fc32.x86_64.rpm           385 kB/s |  86 kB     00:00   
(2/8): clang-devel-10.0.0-2.fc32.x86_64.rpm     798 kB/s | 1.7 MB     00:02   
(3/8): cmake-filesystem-3.17.4-1.fc32.x86_64.rp  37 kB/s |  15 kB     00:00   
(4/8): clang-libs-10.0.0-2.fc32.x86_64.rpm      1.8 MB/s |  24 MB     00:13   
(5/8): clang-tools-extra-10.0.0-2.fc32.x86_64.r 978 kB/s |  13 MB     00:13   
(6/8): compiler-rt-10.0.0-1.fc32.x86_64.rpm     165 kB/s | 1.9 MB     00:11   
(7/8): libomp-devel-10.0.0-1.fc32.x86_64.rpm     12 kB/s |  17 kB     00:01   
(8/8): libomp-10.0.0-1.fc32.x86_64.rpm          162 kB/s | 363 kB     00:02   
--------------------------------------------------------------------------------
Total                                           2.5 MB/s |  41 MB     00:16    
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : libomp-10.0.0-1.fc32.x86_64                            1/8
  Installing       : compiler-rt-10.0.0-1.fc32.x86_64                       2/8
  Installing       : cmake-filesystem-3.17.4-1.fc32.x86_64                  3/8
  Installing       : clang-tools-extra-10.0.0-2.fc32.x86_64                 4/8
  Installing       : clang-libs-10.0.0-2.fc32.x86_64                        5/8
  Installing       : clang-10.0.0-2.fc32.x86_64                             6/8
  Installing       : clang-devel-10.0.0-2.fc32.x86_64                       7/8
  Installing       : libomp-devel-10.0.0-1.fc32.x86_64                      8/8
  Running scriptlet: libomp-devel-10.0.0-1.fc32.x86_64                      8/8
  Verifying        : clang-10.0.0-2.fc32.x86_64                             1/8
  Verifying        : clang-devel-10.0.0-2.fc32.x86_64                       2/8
  Verifying        : clang-libs-10.0.0-2.fc32.x86_64                        3/8
  Verifying        : clang-tools-extra-10.0.0-2.fc32.x86_64                 4/8
  Verifying        : cmake-filesystem-3.17.4-1.fc32.x86_64                  5/8
  Verifying        : compiler-rt-10.0.0-1.fc32.x86_64                       6/8
  Verifying        : libomp-10.0.0-1.fc32.x86_64                            7/8
  Verifying        : libomp-devel-10.0.0-1.fc32.x86_64                      8/8
 
Installed:
  clang-10.0.0-2.fc32.x86_64             clang-devel-10.0.0-2.fc32.x86_64      
  clang-libs-10.0.0-2.fc32.x86_64        clang-tools-extra-10.0.0-2.fc32.x86_64
  cmake-filesystem-3.17.4-1.fc32.x86_64  compiler-rt-10.0.0-1.fc32.x86_64      
  libomp-10.0.0-1.fc32.x86_64            libomp-devel-10.0.0-1.fc32.x86_64     
 
Complete!
[jeremiah@192 ~]$ clang
clang-10: error: no input files
[jeremiah@192 ~]$ clang --version
clang version 10.0.0 (Fedora 10.0.0-2.fc32)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
[jeremiah@192 ~]$ which clang
/usr/bin/clang
[jeremiah@192 ~]$
 

Shelom

时成阁

Anno Domini 2020-09-18 07:01