grishka / libtgvoip

VoIP library for Telegram clients
The Unlicense
387 stars 156 forks source link

libtgvoip: use SSE2 cflags only in supported archs #40

Closed 3v1n0 closed 6 years ago

3v1n0 commented 6 years ago

Without this libtgvoip won't compile in ARM CPUs.

Fixes #28

d0tfile commented 6 years ago

@3v1n0, are you sure about uname -p? For me (Arch Linux x86_64) output of command is unknown. However on server (Ubuntu 16.04) it returns x84_64. Found this: https://github.com/bazelbuild/rules_go/issues/1111

grishka commented 6 years ago

I'm not sure if it's a good idea to use the .gyp file outside of TDesktop. I was going to provide a proper makefile in the future to build libtgvoip as a standalone library.

Also, just removing the x86-specific flags isn't enough to add ARM support, it's also beneficial to include the ARM-specific sources in the WebRTC part.

grishka commented 6 years ago

...so you're actually porting TDesktop to ARM, then this does make sense.

3v1n0 commented 6 years ago

@d0tfile sorry, I only tested this in ubuntu. Does uname -m works for you instead?

As uname -p is also used in various spots inside tdesktop.

3v1n0 commented 6 years ago

@grishka yeah, this PR and https://github.com/telegramdesktop/tdesktop/pull/4399 are enough to get all compiling nicely (see here).

xvitaly commented 6 years ago

Also you can take our patches for ARM from Fedora: https://github.com/xvitaly/tgbuild/blob/master/libtgvoip-build-fixes.patch

We build libtgvoip for all Fedora supported architectures.

3v1n0 commented 6 years ago

@xvitaly good to see it... So probably you could actually propose that in a way that it's upstream-friendly (AKA get rid of the rpm changes) instead.

d0tfile commented 6 years ago

@3v1n0 yes, uname -m works fine for both Arch Linux and Ubuntu.