Skip to contentSkip to conversation

php: drop explicite ARM_INSTRUCTION_SET

PATCH In review Michael Heimpold 3 participants 7 messages Jun 11, 2023 – Jun 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 php: drop explicite ARM_INSTRUCTION_SET

If my git skills don't trick me, forcing ARM mode for PHP dates back to year 2015 with commit e836f8f93.

I wondered whether the compile problem still persists and just tested that it compiles fine for qemuarm nowaydays.

I also tested the binaries on a physical device, a NXP iMX6ULL based one, and did not notice any problems so far.

---
 meta-oe/recipes-devtools/php/php_8.2.6.bb | 9 ---------
 1 file changed, 9 deletions(-)
meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -9
index dad955452..404ff393b 100644
@@ -284,12 +284,3 @@ do_install:append:class-native() {
     create_wrapper ${D}${bindir}/php \
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
 }
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:3719: Error: selected processor does not support Thumb mode `smull r0,r2,r9,r3'
-# | {standard input}:3720: Error: unshifted register required -- `sub r2,r2,r0,asr#31'
-# | {standard input}:3796: Error: selected processor does not support Thumb mode `smull r0,r2,r3,r3'
-# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31'
-# | make: *** [ext/standard/math.lo] Error 1
-ARM_INSTRUCTION_SET = "arm"
Signature · 1 line
2.34.1
#1 lore raw

Did you try it on qemuarmv5? as regular qemuarm used Thumb2 since 2019
https://git.openembedded.org/openembedded-core/commit/meta/conf/machine/qemuarm.conf?id=6fc70eb4f3494bee2be10ee24fe3ea1c8b5ff988
(and most of these issues where ARM_INSTRUCTION_SET is explicitly set in the recipe were reproducible only with Thumb-1).

That said, I haven't built any armv5 builds recently and it's quite likely that nobody cares about Thumb-1 nowadays.

Quoted 52 lines · Michael Heimpold

If my git skills don't trick me, forcing ARM mode for PHP dates back to year 2015 with commit e836f8f93.

I wondered whether the compile problem still persists and just tested that it compiles fine for qemuarm nowaydays.

I also tested the binaries on a physical device, a NXP iMX6ULL based one, and did not notice any problems so far.

---
 meta-oe/recipes-devtools/php/php_8.2.6.bb | 9 ---------
 1 file changed, 9 deletions(-)
meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -4
index dad955452..404ff393b 100644
@@ -284,12 +284,3 @@ do_install:append:class-native() {
     create_wrapper ${D}${bindir}/php \
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
 }
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:3719: Error: selected processor does not support

Thumb mode `smull r0,r2,r9,r3'
-# | {standard input}:3720: Error: unshifted register required -- `sub r2,r2,r0,asr#31'
-# | {standard input}:3796: Error: selected processor does not support Thumb mode `smull r0,r2,r3,r3'
-# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31'

meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -3
-# | make: *** [ext/standard/math.lo] Error 1
-ARM_INSTRUCTION_SET = "arm"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#103205):
https://lists.openembedded.org/g/openembedded-devel/message/103205
Mute This Topic: https://lists.openembedded.org/mt/99465975/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
In reply to Michael Heimpold
Quoted 23 lines · Michael Heimpold

If my git skills don't trick me, forcing ARM mode for PHP dates back to year 2015 with commit e836f8f93.

I wondered whether the compile problem still persists and just tested that it compiles fine for qemuarm nowaydays.

I also tested the binaries on a physical device, a NXP iMX6ULL based one, and did not notice any problems so far.

---
 meta-oe/recipes-devtools/php/php_8.2.6.bb | 9 ---------
 1 file changed, 9 deletions(-)
meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -0
index dad955452..404ff393b 100644
@@ -284,12 +284,3 @@ do_install:append:class-native() {
     create_wrapper ${D}${bindir}/php \
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/

meta-oe/recipes-devtools/php/php_8.2.6.bb do_install:append:class-native() { · line 295

Quoted 10 lines
meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -9
 }
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:3719: Error: selected processor does not support Thumb mode `smull r0,r2,r9,r3'
-# | {standard input}:3720: Error: unshifted register required -- `sub r2,r2,r0,asr#31'
-# | {standard input}:3796: Error: selected processor does not support Thumb mode `smull r0,r2,r3,r3'
-# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31'
-# | make: *** [ext/standard/math.lo] Error 1
-ARM_INSTRUCTION_SET = "arm"

Martin explained it well, it was seen with thumb1 ISA some armv6 and all armv7+ uses thumb2 ISA along with standard ARM ISA Testing this will need armv4/armv5 perhaps you can limit this to armv5/arm4 arches

ARM_INSTRUCTION_SET:armv5 = "arm"
ARM_INSTRUCTION_SET:armv4 = "arm"

If you can test it on armv5 and ensure that it works there too now a days then we can remove it completely

Quoted 12 lines

--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#103205): https://lists.openembedded.org/g/openembedded-devel/message/103205
Mute This Topic: https://lists.openembedded.org/mt/99465975/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

Am Sonntag, 11. Juni 2023, 18:32:31 CEST schrieb Khem Raj:

Quoted 47 lines · Michael Heimpold
Quoted 33 lines

If my git skills don't trick me, forcing ARM mode for PHP dates back to year 2015 with commit e836f8f93.

I wondered whether the compile problem still persists and just tested that it compiles fine for qemuarm nowaydays.

I also tested the binaries on a physical device, a NXP iMX6ULL based one, and did not notice any problems so far.

---

 meta-oe/recipes-devtools/php/php_8.2.6.bb | 9 ---------
 1 file changed, 9 deletions(-)
(quoted diff) +0 -0

b/meta-oe/recipes-devtools/php/php_8.2.6.bb index dad955452..404ff393b 100644

meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -4
@@ -284,12 +284,3 @@ do_install:append:class-native() {
 
     create_wrapper ${D}${bindir}/php \
 
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
 
 }
 
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:3719: Error: selected processor does not support
Quoted 7 lines

Thumb mode `smull r0,r2,r9,r3' -# | {standard input}:3720: Error:
unshifted register required -- sub r2,r2,r0,asr#31' -# | {standard input}:3796: Error: selected processor does not support Thumb mode smull r0,r2,r3,r3' -# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' -# | make: *** [ext/standard/math.lo] Error 1
-ARM_INSTRUCTION_SET = "arm"

Martin explained it well, it was seen with thumb1 ISA some armv6 and all armv7+ uses thumb2 ISA along with standard ARM ISA Testing this will need armv4/armv5 perhaps you can limit this to armv5/arm4 arches

Quoted 5 lines

ARM_INSTRUCTION_SET:armv5 = "arm"
ARM_INSTRUCTION_SET:armv4 = "arm"

If you can test it on armv5 and ensure that it works there too now a days then we can remove it completely

Thank you all for your feedback.

Here is what I've done so far.

I've done a compile test against machine qemuarmv5 which succeeded without errors.

I have a custom board at hand, which uses a NXP iMX28 CPU, the build configuration tells me the same TUNE_FEATURES as qemuarmv5:
MACHINE = "evachargese"
TUNE_FEATURES = "arm armv5 thumb dsp"
I used the kirkstone branch to have a faster roundtrip since the board currently runs a kirkstone-based system. The PHP binaries run without obvious problems in a quick test (simple webpages on the device).

I have no armv4 board at hand nor a found a configuration file for qemuarmv4. So I put some lines manually together using strongarm - which should be armv4, right? It resulted in
TUNE_FEATURES = "arm strongarm"
The build completed without error - no runtime testing with qemu done yet.

#4 lore raw
Quoted 63 lines · Michael Heimpold

Am Sonntag, 11. Juni 2023, 18:32:31 CEST schrieb Khem Raj:

Quoted 1 line

On Sun, Jun 11, 2023 at 9:05 AM Michael Heimpold <[email protected]>

Quoted 29 lines · wrote:
Quoted 29 lines

If my git skills don't trick me, forcing ARM mode for PHP dates back to year 2015 with commit e836f8f93.

I wondered whether the compile problem still persists and just tested that it compiles fine for qemuarm nowaydays.

I also tested the binaries on a physical device, a NXP iMX6ULL based one, and did not notice any problems so far.

---

 meta-oe/recipes-devtools/php/php_8.2.6.bb | 9 ---------
 1 file changed, 9 deletions(-)
(quoted diff) +0 -0

b/meta-oe/recipes-devtools/php/php_8.2.6.bb index dad955452..404ff393b 100644

meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -0
@@ -284,12 +284,3 @@ do_install:append:class-native() {
 
     create_wrapper ${D}${bindir}/php \
 
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
 
 }
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -4
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:3719: Error: selected processor does not support

Thumb mode `smull r0,r2,r9,r3' -# | {standard input}:3720: Error:
unshifted register required -- `sub r2,r2,r0,asr#31' -# | {standard input}:3796: Error: selected processor does not support Thumb mode

`smull

Quoted 10 lines
Quoted 4 lines

r0,r2,r3,r3' -# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' -# | make: *** [ext/standard/math.lo] Error 1
-ARM_INSTRUCTION_SET = "arm"

Martin explained it well, it was seen with thumb1 ISA some armv6 and all armv7+ uses thumb2 ISA along with standard ARM ISA Testing this will need armv4/armv5 perhaps you can limit this to armv5/arm4 arches

Quoted 5 lines

ARM_INSTRUCTION_SET:armv5 = "arm"
ARM_INSTRUCTION_SET:armv4 = "arm"

If you can test it on armv5 and ensure that it works there too now a days then we can remove it completely

Thank you all for your feedback.

Here is what I've done so far.

I've done a compile test against machine qemuarmv5 which succeeded without errors.

Quoted 7 lines

I have a custom board at hand, which uses a NXP iMX28 CPU, the build configuration tells me the same TUNE_FEATURES as qemuarmv5:
MACHINE = "evachargese"
TUNE_FEATURES = "arm armv5 thumb dsp"
I used the kirkstone branch to have a faster roundtrip since the board currently runs a kirkstone-based system. The PHP binaries run without obvious problems in a quick test (simple webpages on the device).

That’s for testing it out. Can you check compiler longs for php and see if it passed -mthumb to it ?

Quoted 13 lines

I have no armv4 board at hand nor a found a configuration file for qemuarmv4.
So I put some lines manually together using strongarm - which should be armv4,
right? It resulted in
TUNE_FEATURES = "arm strongarm"
The build completed without error - no runtime testing with qemu done yet.

#5 lore raw

Am Montag, 12. Juni 2023, 01:44:29 CEST schrieb Khem Raj:

Quoted 76 lines · Michael Heimpold
Quoted 67 lines

Am Sonntag, 11. Juni 2023, 18:32:31 CEST schrieb Khem Raj:

Quoted 1 line

On Sun, Jun 11, 2023 at 9:05 AM Michael Heimpold <[email protected]>

Quoted 29 lines · wrote:
Quoted 29 lines

If my git skills don't trick me, forcing ARM mode for PHP dates back to year 2015 with commit e836f8f93.

I wondered whether the compile problem still persists and just tested that it compiles fine for qemuarm nowaydays.

I also tested the binaries on a physical device, a NXP iMX6ULL based one, and did not notice any problems so far.

---

 meta-oe/recipes-devtools/php/php_8.2.6.bb | 9 ---------
 1 file changed, 9 deletions(-)
(quoted diff) +0 -0

b/meta-oe/recipes-devtools/php/php_8.2.6.bb index dad955452..404ff393b 100644

meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -0
@@ -284,12 +284,3 @@ do_install:append:class-native() {
 
     create_wrapper ${D}${bindir}/php \
 
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
 
 }
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -4
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:3719: Error: selected processor does not support

Thumb mode `smull r0,r2,r9,r3' -# | {standard input}:3720: Error:
unshifted register required -- `sub r2,r2,r0,asr#31' -# | {standard input}:3796: Error: selected processor does not support Thumb mode

`smull

Quoted 11 lines
Quoted 5 lines

r0,r2,r3,r3' -# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' -# | make: *** [ext/standard/math.lo]
Error 1
-ARM_INSTRUCTION_SET = "arm"

Martin explained it well, it was seen with thumb1 ISA some armv6 and all armv7+ uses thumb2 ISA along with standard ARM ISA Testing this will need armv4/armv5 perhaps you can limit this to armv5/arm4 arches

Quoted 5 lines

ARM_INSTRUCTION_SET:armv5 = "arm"
ARM_INSTRUCTION_SET:armv4 = "arm"

If you can test it on armv5 and ensure that it works there too now a days then we can remove it completely

Thank you all for your feedback.

Here is what I've done so far.

I've done a compile test against machine qemuarmv5 which succeeded without errors.

Quoted 7 lines

I have a custom board at hand, which uses a NXP iMX28 CPU, the build configuration tells me the same TUNE_FEATURES as qemuarmv5:
MACHINE = "evachargese"
TUNE_FEATURES = "arm armv5 thumb dsp"
I used the kirkstone branch to have a faster roundtrip since the board currently runs a kirkstone-based system. The PHP binaries run without obvious problems in a quick test (simple webpages on the device).

Quoted 2 lines

That’s for testing it out. Can you check compiler longs for php and see if it passed -mthumb to it ?

Just to ensure, that I got you right: you mean something like grep thumb tmp/work/armv5e-poky-linux-gnueabi/php/8.1.16-r0/temp/log.* which shows an empty result for qemuarmv5/evachargese and for qemuarm there are a lot of matches like:
.../log.do_compile.2431535:/bin/bash /.../cortexa15t2hf-neon-poky-linux- gnueabi/php/8.1.16-r0/build/libtool --silent --preserve-dup-deps --tag CC -- mode=compile arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard - mcpu=cortex-a15 ...

Quoted 7 lines
Quoted 7 lines

I have no armv4 board at hand nor a found a configuration file for qemuarmv4.
So I put some lines manually together using strongarm - which should be armv4,
right? It resulted in
TUNE_FEATURES = "arm strongarm"
The build completed without error - no runtime testing with qemu done yet.

#6 lore raw
Quoted 81 lines · Michael Heimpold

Am Montag, 12. Juni 2023, 01:44:29 CEST schrieb Khem Raj:

Quoted 76 lines · Michael Heimpold
Quoted 67 lines

Am Sonntag, 11. Juni 2023, 18:32:31 CEST schrieb Khem Raj:

Quoted 1 line

On Sun, Jun 11, 2023 at 9:05 AM Michael Heimpold <[email protected]>

Quoted 29 lines · wrote:
Quoted 29 lines

If my git skills don't trick me, forcing ARM mode for PHP dates back to year 2015 with commit e836f8f93.

I wondered whether the compile problem still persists and just tested that it compiles fine for qemuarm nowaydays.

I also tested the binaries on a physical device, a NXP iMX6ULL based one, and did not notice any problems so far.

---

 meta-oe/recipes-devtools/php/php_8.2.6.bb | 9 ---------
 1 file changed, 9 deletions(-)
(quoted diff) +0 -0

b/meta-oe/recipes-devtools/php/php_8.2.6.bb index dad955452..404ff393b 100644

meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -0
@@ -284,12 +284,3 @@ do_install:append:class-native() {
 
     create_wrapper ${D}${bindir}/php \
 
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
 
 }
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-devtools/php/php_8.2.6.bb +0 -4
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:3719: Error: selected processor does not support

Thumb mode `smull r0,r2,r9,r3' -# | {standard input}:3720: Error:
unshifted register required -- `sub r2,r2,r0,asr#31' -# | {standard input}:3796: Error: selected processor does not support Thumb mode

`smull

Quoted 11 lines
Quoted 5 lines

r0,r2,r3,r3' -# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' -# | make: *** [ext/standard/math.lo]
Error 1
-ARM_INSTRUCTION_SET = "arm"

Martin explained it well, it was seen with thumb1 ISA some armv6 and all armv7+ uses thumb2 ISA along with standard ARM ISA Testing this will need armv4/armv5 perhaps you can limit this to armv5/arm4 arches

Quoted 5 lines

ARM_INSTRUCTION_SET:armv5 = "arm"
ARM_INSTRUCTION_SET:armv4 = "arm"

If you can test it on armv5 and ensure that it works there too now a days then we can remove it completely

Thank you all for your feedback.

Here is what I've done so far.

I've done a compile test against machine qemuarmv5 which succeeded without errors.

Quoted 7 lines

I have a custom board at hand, which uses a NXP iMX28 CPU, the build configuration tells me the same TUNE_FEATURES as qemuarmv5:
MACHINE = "evachargese"
TUNE_FEATURES = "arm armv5 thumb dsp"
I used the kirkstone branch to have a faster roundtrip since the board currently runs a kirkstone-based system. The PHP binaries run without obvious problems in a quick test (simple webpages on the device).

Quoted 2 lines

That’s for testing it out. Can you check compiler longs for php and see if it passed -mthumb to it ?

Quoted 8 lines

Just to ensure, that I got you right: you mean something like grep thumb tmp/work/armv5e-poky-linux-gnueabi/php/8.1.16-r0/temp/log.* which shows an empty result for qemuarmv5/evachargese and for qemuarm there are a lot of matches like:
.../log.do_compile.2431535:/bin/bash /.../cortexa15t2hf-neon-poky-linux- gnueabi/php/8.1.16-r0/build/libtool --silent --preserve-dup-deps --tag CC -- mode=compile arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard - mcpu=cortex-a15 ...

yes thanks.

Quoted 12 lines
Quoted 8 lines
Quoted 8 lines

I have no armv4 board at hand nor a found a configuration file for qemuarmv4.
So I put some lines manually together using strongarm - which should be armv4,
right? It resulted in
TUNE_FEATURES = "arm strongarm"
The build completed without error - no runtime testing with qemu done yet.