Can clang compile RELENG_9?
Dennis Glatting
freebsd at pki2.com
Sat Feb 11 21:33:21 UTC 2012
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
More information about the freebsd-questions
mailing list