yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] sparksco:
Yes but for some reason setup wizard force closes. Maybe it's the ROM I'm on or device because other people are using it fine without issues.
[Android Software/Hacking General [Developers Only]] JustArchi:
Would you be so kind to share some SaberMod androideabi arm toolchain? :)

Can't find any on gitlab.
[Android Software/Hacking General [Developers Only]] sparksco:
Sure. I have a plan to make 4.9 future proof. I'm going to attempt a full merge of aosp gcc with gnu gcc. The problem is aosp doesn't keep gnu commit history so every file will have conflicts. The upside to this is I'd have every patch for arm and arm64 that I've had issues finding in their source because of their own merges in their source. That's why right now aarch64 is completely dependent on aosp gcc with no upstream changes from gnu, because the SaberMod 4.9 branch is missing things for android for aarch64. And possibly missing things for arm as well. It might take me awhile to get it working. Wish me luck!
[Android Software/Hacking General [Developers Only]] sparksco:
Good news. No more gitlab for prebuilt toolchains.

http://sabermod.net

Just so you know, things like setup wizard and Bluetooth may not work with gcc 4.9 on the ROM, without some ROM modifications.
[Android Software/Hacking General [Developers Only]] shoey63:
Awesome!

What graphite flags do you suggest to use with these new toolchains ?
[Android Software/Hacking General [Developers Only]] sparksco:
Not sure what you mean?
[Android Software/Hacking General [Developers Only]] shoey63:
Deleted. OT - ?
[Android Software/Hacking General [Developers Only]] sparksco:
I'm still not sure exactly what your asking. If this is related to JustArchi optimizations then ask the OP. Otherwise take the question to the appropriate thread and stop going off topic. I don't have that setup anywhere in my ROM or kernel that you posted.
[Android Software/Hacking General [Developers Only]] Hashbang173:
How would I find the device-specific optimizations for the HTC Nexus 9 (flounder) (64bit, dual core, denver, Tegra K1)?
[Android Software/Hacking General [Developers Only]] JustArchi:
Google, tech docs, specifications.
[Android Software/Hacking General [Developers Only]] surdu_petru:
Hello !

I'm on Ubuntu 14.04 LTS, and I cannot managed to fix "error while loading shared libraries: libisl.so.13" , because after I editing : /etc/apt/sources.list and run : sudo apt-get update I have those warning :

W: There is no public key available for the following key IDs:
7638D0442B90D010
W: Ignoring Provides line with DepCompareOp for package php-psr-log-implementation

Please, if someone can help me - thanks in advance !

Solved :

Download libisl13 for Ubuntu !
[Android Software/Hacking General [Developers Only]] JustArchi:
The fix is for debian, if you're using ubuntu, you should find yourself where the package is located.
[Android Software/Hacking General [Developers Only]] kogone:
thanks for your work!

im building cm-12.1 for cancro (Mi4) and cherrypicked the optimizations. getting errors about size and allocation in fastboot.c should i just turn off warnings being treated as errors?

host C: fastboot <= system/core/fastboot/usb_linux.c
system/core/fastboot/fastboot.c: In function 'do_update':
system/core/fastboot/fastboot.c:756:21: error: 'sz' may be used uninitialized in this function [-Werror=maybe-uninitialized]
tmp = malloc(sz + 128);
^
system/core/fastboot/fastboot.c:745:9: error: 'zsize' may be used uninitialized in this function [-Werror=maybe-uninitialized]
zip = init_zipfile(zdata, zsize);
^
system/core/fastboot/fastboot.c: In function 'do_flashall':
system/core/fastboot/fastboot.c:820:23: error: 'sz' may be used uninitialized in this function [-Werror=maybe-uninitialized]
setup_requirements(data, sz);
^
cc1: all warnings being treated as errors
build/core/binary.mk:699: recipe for target 'cm/12.1/out/host/linux-x86/obj32/EXECUTABLES/fastboot_intermediates/fastboot.o' failed
make: *** [/cm/12.1/out/host/linux-x86/obj32/EXECUTABLES/fastboot_intermediates/fastboot.o] Error 1
[Android Software/Hacking General [Developers Only]] kenzolo:
in addition to configs/sm.mk we need to include other commits from sabermod? for example

https://gitlab.com/SaberMod/android-vendor-pa/commit/e56ded23054a0ba016f088b8737334edb8d0d914

https://gitlab.com/SaberMod/pa-android-build/commit/6b8b804bd5e421b11661114787287d261b6d20ce
[Android Software/Hacking General [Developers Only]] layman806:
Yes, delete -werror or -w from the make file throwing this warning.
[Android Software/Hacking General [Developers Only]] kogone:
i can't find those in /build/core/Makefile

i'm switching line 732 to continue

DEFAULT_TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS := ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=[B]continue[/B],nodelalloc

edit:

you probably meant /system/core/fastboot/Android.mk?

i removed the -Werror from that file

update:

that worked. build completed and enjoying the optimization
[Android Software/Hacking General [Developers Only]] layman806:
Which worked? -werrror or continue?
[Android Software/Hacking General [Developers Only]] kogone:
removing -werror

i think forcing continue to the whole build would make it impossible to find any errors that may have occurred elsewhere
[Android Software/Hacking General [Developers Only]] Khaon:
You should not remove Werror. However you may add globally or in the Module Make file -Wno-maybe-unintialized to disable this error halt.
[Android Software/Hacking General [Developers Only]] kogone:
thanks for pointing this out!

so in the fastboot/Android.mk file i should change:

-LOCAL_CFLAGS := -Werror

to

-LOCAL_CFLAGS := -Wno-maybe-unintialized

:highfive::highfive:
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Actually, I think it was meant to be:

-LOCAL_CFLAGS := -Werror -Wno-maybe-uninitialized
[Android Software/Hacking General [Developers Only]] kogone:
got this:

cc1: error: unrecognized command line option "-Wno-maybe-unintialized" [-Werror]
cc1: all warnings being treated as errors

maybe i'll try -Wuninitialized instead
[Android Software/Hacking General [Developers Only]] JustArchi:
No, this means that your compiler is too old to recognize that command. It was added with gcc 4.8 IIRC.
[Android Software/Hacking General [Developers Only]] kogone:
cool ill update that. thanks man!

edit: nvm.. i got double check everything bec i had to add the optimization commits manully instead of cherry-pick
[Android Software/Hacking General [Developers Only]] Khaon:
Sorry I misstyped as I wrote from my tablet. Here is the correct spelling -Wno-maybe-uninitialized

Also notice that your build fails with a host module. So make sure to add this option to the correct module, I.e. if the Android.mk defines fastboot for target & host make sure not to add the opt to the wrong module definition

However for you convenience I would add globally this option to the whole build. You can do so by adding the option to these lines

https://github.com/android/platform_build/blob/master/core/combo/select.mk#L36

If you face another error that might be false positive, you will see something like -Werror=<the error name>. To disable halt on that just add this option -Wno-<the error name>

You can identify also the name of the module as it is in the path of the failed module.

But if you just want to find easily where is located the modules make file not to add globally something just go there : http://androidxref.com/5.1.0_r1/

You can easily find the module location by issuing a search on .mk filew
[Android Software/Hacking General [Developers Only]] Jazznax:
I'm a noob. How do I as this to my device? I have no experience with commits and github
[Android Software/Hacking General [Developers Only]] kogone:
thanks for explaining that! i'll implement the changes tonight. got to read that a few times to let it sink in.. :good:

when i switched gcc to sm4.8 i got this error:

frameworks/av/media/libstagefright/codecs/m4v_h263/dec/src/deringing_luma.cpp:132:9: error: assuming signed overflow does not occur when assuming that (X + c) >= X is always true [-Werror=strict-overflow]

which i fixed with by adding:

+LOCAL_CFLAGS += -Werror [B]-Wno-error=strict-overflow[/B]

i followed tihs explanation:

http://xdaforums.com/galaxy-s4-mini/development/cm12-building-optimising-fixing-fun-t2982639

the build completed after this!

:highfive::highfive:
[Android Software/Hacking General [Developers Only]] kogone:
learn everything here

http://wiki.cyanogenmod.org/w/Development#Learning_To_Build_CM

that's what i did
[Android Software/Hacking General [Developers Only]] :
Can someone please tell me how to add the custom toolchain? (I want to use Linaro and I'm not sure what to edit)

Thanks!
[Android Software/Hacking General [Developers Only]] kogone:
this is not the right place to ask...

here: http://xdaforums.com/chef-central/android/guide-switching-to-custom-toolchain-t2927662
[Android Software/Hacking General [Developers Only]] Sick1:
[MENTION=5161352]JustArchi[/MENTION]

I thank you for your work, been using your optimizations since kitkat without any issues to report :)

A question i have is, do you have any architoolchain to use for rom, or are all gnueabi stuff just meant for kernel?

Do you still recommend sabermod androideabi 4.8 for rom and architoolchain-* for kernel?

Currently building aosp rom to Nexus 5. I build few different versions with and without your optimizations and would like to do the one with your optimizations, with your toolchains.

Currently the kernel is compiled with architoolchain-5.1-arm-linux-gnueabihf and rom with Linaro 4.9.
[Android Software/Hacking General [Developers Only]] JustArchi:
You can always check current toolchains used by me in my AD manifest. I got best results with SM 4.8 for ROM and latest AT (now 5.1) for the kernel. In fact, I do plan making AT for ROM part as well at some point, but SM satisfies me to the point that it's on my low priority for now.
[Android Software/Hacking General [Developers Only]] Khaon:
AT is team asek? I couldn't find in your room service file the 5.1 GCC for the kernel
[Android Software/Hacking General [Developers Only]] Sick1:
AT stands for architoolchain :)
[Android Software/Hacking General [Developers Only]] Khaon:
Lol thx!
[Android Software/Hacking General [Developers Only]] JustArchi:
Then keep looking ;). My manifest is shared across all devices I currently support, so master-cm includes only global changes. Kernel toolchain is targeted, although it should change soon as I released quite good generic AT recently.
[Android Software/Hacking General [Developers Only]] jgcaap:
JustArchi what's your opinion of flood nest optimization? I've been reading about that should be used with art because of the loop formulas. For now I'm quite happy with just archi v4, you've done a good job. Would like to see if I could improve my builds. Thanks
[Android Software/Hacking General [Developers Only]] :
Did anyone get this error:

/tmp/cceYnpKJ.s: Assembler messages:
/tmp/cceYnpKJ.s:7379: Error: no such instruction: `vfmadd312sd .LC64@GOTOFF(%ebx),%xmm1,%xmm0'
/tmp/cceYnpKJ.s:7436: Error: no such instruction: `vfmadd312sd .LC64@GOTOFF(%ebx),%xmm1,%xmm0'
/tmp/cceYnpKJ.s:7846: Error: no such instruction: `vfmadd312sd .LC64@GOTOFF(%ebx),%xmm1,%xmm0'
build/core/binary.mk:699: recipe for target '/home/dorian/PAC/out/host/linux-x86/obj32/STATIC_LIBRARIES/libpng_intermediates/png.o' failed
[Android Software/Hacking General [Developers Only]] jgcaap:
what are you trying to compile? Show source please
[Android Software/Hacking General [Developers Only]] :
PAC ROM 5.1

http://pastebin.com/22Jp1Pnp
[Android Software/Hacking General [Developers Only]] jgcaap:
but your source which one is ?
[Android Software/Hacking General [Developers Only]] Eliminater74:
[MENTION=5161352]JustArchi[/MENTION],

I wanted to take the time to thank you for all your hardwork that you put into your ArchiDroid Optimized V4. I have used it a few times, Giving full credits to you, in My LG G3 D851 Pac-Man Rom LP 5.1.1..

Just for kicks I decided to do a little bench-marking, something I dont normally do. I got a score up in the 44500 range. I been having people all day ask me how I got scores like that.

I port pac-Man Rom Unofficially along with a few other projects I have, and I add tweaks here and there.

I figure I could take the time to come here and thank you..

​

This is NOT OVERCLOCKED.
[Android Software/Hacking General [Developers Only]] sparksco:
Or refer to this post. The SaberMod commits will allow you to switch toolchains. Not sure if the optimizations will play nice with these optimizations though.

http://xdaforums.com/showthread.php?p=60945188
[Android Software/Hacking General [Developers Only]] akhilnarang:
http://pastebin.com/aBy3Sb6d

I got this error aswell [MENTION=2040569]jgcaap[/MENTION] [MENTION=5746995]doriandiaconu[/MENTION]

Any fix??

I am building OwnROM

https://github.com/OwnROM/
[Android Software/Hacking General [Developers Only]] jgcaap:
I do not know why you received that error. What tool chain are you using? are you building on your pc? do you use brunch instruction or make? how many -j level do you use? Whats your cpu caracteristics?
[Android Software/Hacking General [Developers Only]] akhilnarang:
Building for OnePlus One on my laptop, with make, using 8 jobs

Using toolchains recommended by [MENTION=5161352]JustArchi[/MENTION] in the OP

---------- Post added at 12:27 AM ---------- Previous post was at 12:25 AM ----------

Building for OnePlus One on my laptop, with make with 8jobs

Using toolchains recommended by [MENTION=5161352]JustArchi[/MENTION] in the OP
[Android Software/Hacking General [Developers Only]] Khaon:
It is because of the architecture specified in your build make file.

Go into your build/core three look for -march=native or Prescott from the host Linux XXX. Mk files located in clang and combo folder and remove it

Envoyé de mon One X en utilisant Tapatalk
[Android Software/Hacking General [Developers Only]] jgcaap:
Thanks :) usefull info , always learning!
[Android Software/Hacking General [Developers Only]] ne0zone75:
Many thanks [MENTION=5161352]JustArchi[/MENTION] + [MENTION=2394329]sparksco[/MENTION] for this great work ;)

Built SlimLP for 'serrano' without any problems and early results are really very good :) :good:

Any recommendation for using specific toolchains different from those proposed in the OP ? S4 mini is sporting a MSM8930AB QC chipset...

Kind regards !

Tapatalked from my D821
[Android Software/Hacking General [Developers Only]] akhilnarang:
Thanks, will definetly try
[Android Software/Hacking General [Developers Only]] akhilnarang:
Did that, now got this

frameworks/base/core/res/res/drawable-mdpi/maps_google_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
Host Clang TableGen: llvm-rs-cc (gen-clang-comment-command-list) <= external/clang/include/clang/AST/CommentCommands.td
external/libcxx/include/atomic:825: error: undefined reference to '__sync_lock_test_and_set_8'
Host Clang TableGen: llvm-rs-cc (gen-clang-comment-nodes) <= external/clang/include/clang/Basic/CommentNodes.td
external/libcxx/include/atomic:825: error: undefined reference to '__sync_lock_test_and_set_8'
external/libcxx/include/atomic:825: error: undefined reference to '__sync_lock_test_and_set_8'
external/libcxx/include/atomic:825: error: undefined reference to '__sync_lock_test_and_set_8'
Host Clang TableGen: llvm-rs-cc (gen-clang-diags-defs -clang-component=Common) <= external/clang/include/clang/Basic/Diagnostic.td
Host Clang TableGen: llvm-rs-cc (gen-clang-diags-defs -clang-component=Driver) <= external/clang/include/clang/Basic/Diagnostic.td
Host Clang TableGen: llvm-rs-cc (gen-clang-diags-defs -clang-component=Frontend) <= external/clang/include/clang/Basic/Diagnostic.td
Host Clang TableGen: llvm-rs-cc (gen-clang-diags-defs -clang-component=Sema) <= external/clang/include/clang/Basic/Diagnostic.td
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:44: recipe for target '/home/akhil/OwnROM/out/host/linux-x86/obj32/lib/libart.so' failed
make: *** [/home/akhil/OwnROM/out/host/linux-x86/obj32/lib/libart.so] Error 1
[Android Software/Hacking General [Developers Only]] Khaon:
I think your issues is due because you started building for with March equaling to Prescott. Did you start from? the very beginning or continue your build?

Envoyé de mon One X en utilisant Tapatalk
[Android Software/Hacking General [Developers Only]] akhilnarang:
I found some lines with -march=native

I removed the native, let the rest be

Started clean build, with no ccache
[Android Software/Hacking General [Developers Only]] Mata99:
I get this error, how can I fix?

http://pastebin.com/aETXYx5x
[Android Software/Hacking General [Developers Only]] ne0zone75:
libwebviewchromium.so build error...

Hi,

Any idea why i am having this fatal error while building latest 'ResurrectionRemix' sources for hammerhead with build optimizations v4 applied using SaberMod v4.8 ROM toolchain ?!

Thanks for your assistance ! :good:

EDIT : Okay ! I was certainly short of RAM during the above mentioned failed build because after having rebooted my PC and launched another building process, this last one ended up successfully ! :)
[Android Software/Hacking General [Developers Only]] akhilnarang:
All you did was cherry-pick??

Anything else??

Because I too got a lot of errors
[Android Software/Hacking General [Developers Only]] ne0zone75:
No ! I did not 'cherry-pick' [MENTION=5161352]JustArchi[/MENTION] v4 commit, i applied it manually... by editing each concerned file...

Also, i used 'SaberMod toolchains' v4.8 for both kernel + ROM.

IMO, my computer ran out of free RAM...

Be well !

Tapatalked from my D821
[Android Software/Hacking General [Developers Only]] mkaluza:
Hi guys! I've applied some of Archi's optimizations to KitKat Vanir ROM for my Galaxy S Advance and I have a problem with images on Google Play. Everywhere else the images are fine (so far). What triggers the error is the -O3 flag (O2 as well) for thumb mode.

I'm using linaro 4.8 gcc.

Any hints where/what to look for? (I had also problems with Google play services crashing but it was solved by patch removing some forced alignments for libcore).
[Android Software/Hacking General [Developers Only]] judas1977:
That's known linaro/google play bug
[Android Software/Hacking General [Developers Only]] MCP1:
You can compile your rom with aosp 4.8.1 gcc (don't use a newer one) and save the library file

libskia.so

. Then recompile the rom with your favorite toolchain and replace the produced libskia.so with the one you saved before. Remember to clear your build/caches between toolchain changes.

To get the right 4.8 gcc, you can add this line to your local manifests:

<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="aosp" revision="refs/tags/android-4.4w_r1" />

To automatize your build process, you can add the saved libskia.so to your proprietary vendor file list/repo.
[Android Software/Hacking General [Developers Only]] macs18max:
I'm building for a old cortex-v8/scorpion neon processor lollipop. I got a compilation error whilst compiling the ROM, regarding the kernel. So I reverted arm-aebi to aosp 4.8 (which is use to only compile kernel AFAIK) and built the whole rom sucessfully with sabermods/arm-linux-androidaebi-4.8.

Now I want try and build the Kernel seperately using archi build toolchain 4.9 for this kernel. https://github.com/HtcLegacy/android_kernel_htc_pico/blob/cm-12.1/Makefile

which toolchain can I use and what flags should i change for cortex-v8/scorpion for archi optimisation?
[Android Software/Hacking General [Developers Only]] mkaluza:
Thanks for all the info. I'll try it, because changing webp to the one from Archi didn't help.

I'm not sure if it's necessary... From what the docs say, ccache can tell when different compiler is used and not use cached version...

Thanks for the tips ;)
[Android Software/Hacking General [Developers Only]] mkaluza:
Ok, I take that back - the patch did help, but originally didn't include gcc 4.8

https://github.com/mkaluza/external_webp/commit/7bdc6a48070e26fe5d25fd770dbd1b53b26bd2e7
[Android Software/Hacking General [Developers Only]] MCP1:
I had problems in the past building after switching toolchains, but I don't use ccache (it doesn't improve compilation time significantly for me and trashes my ssd...)

If you compile libskia.so with aosp gcc 4.8.1 you don't need to apply the webp commit, you can use the original cm/aosp version.
[Android Software/Hacking General [Developers Only]] ne0zone75:
Clarifications about benchmarking sessions results...

Hello there,

I am using [MENTION=5161352]JustArchi[/MENTION] build optimizations for a while now, along with 'Sabermod toolchains' for building both ROM + kernel of various custom ROMs...

with KK, it was simple for me : once ROM was successfully built, flashed and running => 'Antutu session' which was always giving me at least 10-15% bigger 'Antutu score' than without these optimizations and enhanced toolchains...

with LP, it is not that simple for me : acting like described just above is giving me at least 15% smaller 'Antutu score' for the optimized ROM ! Nevertheless, homemade optimized ROM is fast, smooth and stable !

So, is 'Antutu APP.' a reliable SW if used to quantify the impact of [MENTION=5161352]JustArchi[/MENTION] commit for LP ? If it is not the case, which APP. to use ? Quadrant ?! GeekBench ?!

Anyway, i already successfully applied v4 commit for SlimLP + OmniROM 5.1 among other homebuilt custom ROMs !

Congratulations for your hard work ! :good: ... and thanks for your comments and answers ;)
[Android Software/Hacking General [Developers Only]] Epirex:
Hi [MENTION=5161352]JustArchi[/MENTION] I tried compile CM11 with ArchiDroid Optimizations V3 and SaberMod 4.8 but don't boot :(

I have Samsung Galaxy S Advance, cortex a9

More info: my kernel have commits for GCC 4.8

EDIT: you forget what I said, was a problem of device tree xD
[Android Software/Hacking General [Developers Only]] mkaluza:
Can you write what the problem was, because I have the same issue with SaberMod toolchain :(
[Android Software/Hacking General [Developers Only]] Epirex:
I forgot to write this line genfstab: fix typo and boot

But, many users reported problem with Wi-Fi and I suspect that JustArchi cause this
[Android Software/Hacking General [Developers Only]] sparksco:
Hey guys. Check this post for easier use of the latest http://sabermod.com toolchains .

https://plus.google.com/+PaulBeeler/posts/MyeMTfMRMv8
[Android Software/Hacking General [Developers Only]] xperiafan13:
Hello

Hi, I'm compiling slimrom with these optimizations, all is well, but when it comes to compiling the kernel tells me arm-EABI-gcc not found, I put everything correctly, use sabermod 4.8, is there any way to make recognize by the toolchain ?
[Android Software/Hacking General [Developers Only]] akhilnarang:
Check the path
[Android Software/Hacking General [Developers Only]] xperiafan13:
im already fix this... but im have this.. To build the kernel despite the mismatches, build with:

'make CONFIG_NO_ERROR_ON_MISMATCH=y'

im add CONFIG_NO_ERROR_ON_MISMATCH=Y to defconfig... is correct?
[Android Software/Hacking General [Developers Only]] sparksco:
Slim in general has issues with sabermod toolchains... I'm pretty sure they use stock Google toolchains and their sources aren't good to compile with custom toolchains. Last time I tried with arm-linux-androideabi-4.9 for the rom and 5.1.1 for the kernel and I had errors for both the kernel and rom. Even with my own modifications for the kernel to compile with gcc 5.1.1