-
Notifications
You must be signed in to change notification settings - Fork 180
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
Building Toolchain Error: ISO C++ forbids comparison between pointer and integer #135
Comments
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
expanded_location xloc = expand_location (loc);
if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
- || xloc.file == '\0' || xloc.file[0] == '\xff'
+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
|| xloc.file[1] == '\xff')
return false;
|
@vindicatorr hope that patch helps. |
how do i apply this patch . i am getting same error in debian 64 bit running normally without doing any adventures |
i tried copy pasting code and rename it to .patch and do git apply < file.patch it says corrupt patch at line 10. |
this is the full error : /root/Desktop/open-ath9k-htc-firmware/toolchain/dl/gcc-6.3.0/gcc/ubsan.c: In function ‘bool ubsan_use_new_style_p(location_t)’: |
@Dukhiaatma That is roughly how you do it, make sure you copied it correctly. If it still doesn't work make the change in the file ubsan.c yourself (i.e. add the [0] in the right place) |
@nroach44 thank you kind sir, build start again. at first it looked like same code and then saw zero before equals sign. |
Here is the pull request for GCC 7.2.0 |
I'm afraid it's still erring out with the same message:
Although I should add that I'm doing a build with the native toolchain on my ARM device: Would you say the binutils/gcc patches are relevant to this issue or this specific firmware in general that the native toolchain from Arch won't be enough? |
what do you mean by native toolchain? |
Ahhhh yea!
I will say that the master mpc failed check for tmul so I just skipped it. The rest of the built went fine. |
I think this issue can be closed since I've been able to build it now. |
crosstool-ng/crosstool-ng#735
For curiosity sake, I thought I might try the latest versions by editing the Makefile:
GMP_VER=6.1.2
MPFR_VER=3.1.5
BINUTILS_VER=2.29
GCC_VER=7.2.0 (had to point to tar.xz and unpack with tar -xaf)
I excluded all patches and the toolchain looked to build just fine... HOWEVER building the target_firmware didn't like some literal relocations:
The text was updated successfully, but these errors were encountered: