Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2012 13:33:15 -0800
From:      Dennis Glatting <freebsd@pki2.com>
To:        freebsd-questions@freebsd.org
Subject:   Can clang compile RELENG_9?
Message-ID:  <1328995995.65205.1.camel@btw.pki2.com>

Next in thread | Raw E-Mail | Index | Archive | Help
I get errors when trying to compile RELENG_9 with clang. Is clag suppose
to work when it comes to compiling the OS or am I missing something: 



clang -O2 -pipe  -DUSE_GZIP=1
-I/usr/src/usr.sbin/sysinstall/../../gnu/lib/libodialog -I. -std=gnu99
-fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k
-Wno-uninitialized -Wno-pointer-sign -Wno-tautological-compare
-Wno-unused-value -Wno-parentheses-equality -Wno-unused-function
-Wno-conversion -Wno-switch-enum -Wno-empty-body
-c /usr/src/usr.sbin/sysinstall/dispatch.c
/usr/src/usr.sbin/sysinstall/dispatch.c:594:17: error: format string is
not a
      string literal (potentially insecure) [-Werror,-Wformat-security]
            msgConfirm(err);
                       ^~~
1 error generated.
*** Error code 1


When compiling the kernel:

clang -c -O2 -pipe -fno-strict-aliasing  -std=c99  -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef
-Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs
-fdiagnostics-show-option  -Wno-error-tautological-compare
-Wno-error-empty-body  -Wno-error-parentheses-equality -nostdinc  -I.
-I../../.. -I../../../contrib/altq -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
-fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone
-mno-mmx -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding
-fstack-protector -Werror  ../../../dev/an/if_an.c
../../../dev/an/if_an.c:799:41: error: implicit conversion from
enumeration type
      'enum ieee80211_phytype' to different enumeration type
      'enum ieee80211_phymode' [-Werror,-Wconversion]
                mword = ieee80211_rate2media(NULL, r, IEEE80211_T_DS);
                        ~~~~~~~~~~~~~~~~~~~~          ^~~~~~~~~~~~~~
../../../dev/an/if_an.c:3301:30: error: implicit conversion from
enumeration
      type 'enum ieee80211_phytype' to different enumeration type
      'enum ieee80211_phymode' [-Werror,-Wconversion]
                status.an_current_tx_rate, IEEE80211_T_DS);
                                           ^~~~~~~~~~~~~~
2 errors generated.
*** Error code 1







Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?1328995995.65205.1.camel>