Questions about setting/disabling AVX(2) in builds Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Walter Dnes
Astronaut
Astronaut
Posts: 701
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Questions about setting/disabling AVX(2) in builds

Unread post by Walter Dnes » 2025-01-25, 02:16

The AVX2/no-AVX ftp site seems to occasionally be offline. I also like to do my own custom linux builds. So I'm asking for info to enable me to do my own personal build.

1) I want to enable AVX2 for a reasonably new desktop. Will the "-march=native" option pick up AVX2 support, or is another specific switch also required?

2) I have a couple of OLD Lenovo laptops with Core2 cpus lying around. According to https://gcc.gnu.org/onlinedocs/gcc-13.3 ... tions.html the Core2 has...
"Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, CX16, SAHF and FXSR instruction set support". I Intend to build with "-march=core2" on my desktop. Will that turn off building with AVX, or is another switch also required?
There are 2 kinds of people in this world...
1) Those who can extrapolate from incomplete data

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37641
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Questions about setting/disabling AVX(2) in builds

Unread post by Moonchild » 2025-01-25, 02:21

Walter Dnes wrote:
2025-01-25, 02:16
1) I want to enable AVX2 for a reasonably new desktop. Will the "-march=native" option pick up AVX2 support, or is another specific switch also required?
-march=native will always use the feature set available for your CPU. from gcc docs
Using -march=native enables all instruction subsets supported by the local machine (hence the result might not run on different machines).
You shouldn't need anything else. This is provided you are compiling on the same machine you intend to run it on, of course.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Walter Dnes
Astronaut
Astronaut
Posts: 701
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Questions about setting/disabling AVX(2) in builds

Unread post by Walter Dnes » 2025-01-25, 02:56

Moonchild wrote:
2025-01-25, 02:21
-march=native will always use the feature set available for your CPU. from gcc docs

Using -march=native enables all instruction subsets supported by the local machine (hence the result might not run on different machines).
Thank you for the quick reply. I had suspected this, but I've learned over the years to never ASS-U-ME anything.
Moonchild wrote:
2025-01-25, 02:21
You shouldn't need anything else. This is provided you are compiling on the same machine you intend to run it on, of course.
The "-march=native" build will run on the desktop machine it's built on. I'll also do the "-march=core2" build on the desktop and scp it over to the laptops. No way I'm building Pale Moon on the 6-gig-ram core2 laptop, let alone on the 3-gig-ram core2 laptop.

I'm part way through migrating my machines from Gentoo to Devuan (Debian fork without systemd). I'm spending too much time compiling stuff. Every machine will have the same Devuan 64-bit environment, so running a program built on any of the machines should work, as long as there's nothing CPU-specific.
There are 2 kinds of people in this world...
1) Those who can extrapolate from incomplete data

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2882
Joined: 2012-08-19, 20:32

Re: Questions about setting/disabling AVX(2) in builds

Unread post by back2themoon » 2025-01-27, 23:17

Walter Dnes wrote:
2025-01-25, 02:16
The AVX2/no-AVX ftp site seems to occasionally be offline.
There's https as well:

https://ftp2.palemoon.org/avx/

User avatar
Pentium4User
Board Warrior
Board Warrior
Posts: 1324
Joined: 2019-04-24, 09:38

Re: Questions about setting/disabling AVX(2) in builds

Unread post by Pentium4User » 2025-01-28, 16:35

back2themoon wrote:
2025-01-27, 23:17
Walter Dnes wrote:
2025-01-25, 02:16
The AVX2/no-AVX ftp site seems to occasionally be offline.
There's https as well:

https://ftp2.palemoon.org/avx/
IIRC http was disabled intenionally, ask MC.

Although, rejecting it properly with ICMP would be much better than just dropping the traffic.
The profile picture shows my Maico EC30 E ceiling fan.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2882
Joined: 2012-08-19, 20:32

Re: Questions about setting/disabling AVX(2) in builds

Unread post by back2themoon » 2025-01-28, 17:30

Pentium4User wrote:
2025-01-28, 16:35
IIRC http was disabled intenionally, ask MC
What are you talking about?

Walter Dnes
Astronaut
Astronaut
Posts: 701
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Questions about setting/disabling AVX(2) in builds

Unread post by Walter Dnes » 2025-01-28, 22:33

back2themoon wrote:
2025-01-28, 17:30
Pentium4User wrote:
2025-01-28, 16:35
IIRC http was disabled intenionally, ask MC
What are you talking about?
Here we get picky, picky, picky

* "https" with the "s" works
* "http" without the "s" fails
There are 2 kinds of people in this world...
1) Those who can extrapolate from incomplete data

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2882
Joined: 2012-08-19, 20:32

Re: Questions about setting/disabling AVX(2) in builds

Unread post by back2themoon » 2025-01-29, 08:02

Walter Dnes wrote:
2025-01-28, 22:33
Here we get picky, picky, picky
.
Yet I'm still the one to be quoted here. I guess posting correct information is now "picky".

The fully working httpS link was hard to miss. Guess I need to be more careful with my time.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37641
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Questions about setting/disabling AVX(2) in builds

Unread post by Moonchild » 2025-01-29, 11:28

I don't even understand what the problem is here.
For those that don't have access to ftp or ftps (both re supported!), there is an https (yes with the S) alternative. There is no requirement to always run the http and https protocols in tandem; in this case I don't want to be running an http server on an open port on that machine that is a common scan vector to find active machines (with the inevitable result of triggering vulnerability probles and wasting a lot of compute stopping those at the door - don't underestimate the percentage of traffic these days being malicious probes on smaller organisations. You'd be shocked), all just so people who don't use proper URLs for the courtesy access don't get pointed to their error by masking it with a forward.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite