Repository: conan-io/conan

Issue:
AutotoolsBuildEnvironment adjusting gnueabi in triplet for x86
To help us debug your issue please explain:

- [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/conan/develop/.github/CONTRIBUTING.md).
- [x] I've specified the Conan version, operating system version and any tool that can be relevant.
- [x] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.

https://twitter.com/DEGoodmanWilson/status/968797501447917568





Discussion:

Resolving patch:
diff --git a/conans/client/build/autotools_environment.py b/conans/client/build/autotools_environment.py
--- a/conans/client/build/autotools_environment.py
+++ b/conans/client/build/autotools_environment.py
@@ -77,7 +77,7 @@ def _get_host_build_target_flags(self, arch_detected, os_detected):
         else:  # Building for Linux or Android
             build = "%s-%s" % (arch_detected, {"Linux": "linux-gnu",
                                                "Darwin": "apple-darwin"}.get(os_detected,
-                                                                            os_detected.lower()))
+                                                                             os_detected.lower()))
             if arch_setting == "x86":
                 host_arch = "i686"
             elif arch_setting == "armv8":
@@ -85,16 +85,19 @@ def _get_host_build_target_flags(self, arch_detected, os_detected):
             else:
                 host_arch = "arm" if "arm" in arch_setting else arch_setting
 
-            host = "%s%s" % (host_arch, {"Linux": "-linux-gnueabi",
+            host = "%s%s" % (host_arch, {"Linux": "-linux-gnu",
                                          "Android": "-linux-android",
                                          "Macos": "-apple-darwin",
                                          "iOS": "-apple-darwin",
                                          "watchOS": "-apple-darwin",
                                          "tvOS": "-apple-darwin"}.get(os_setting, ""))
-            if arch_setting == "armv7hf" and os_setting == "Linux":
-                host += "hf"
-            elif "arm" in arch_setting and arch_setting != "armv8" and os_setting == "Android":
-                host += "eabi"
+
+            if os_setting in ("Linux", "Android"):
+                if "arm" in arch_setting and arch_setting != "armv8":
+                    host += "eabi"
+
+                if arch_setting == "armv7hf" and os_setting == "Linux":
+                    host += "hf"
 
         return build, host, None
 


Test patch:
diff --git a/conans/test/build_helpers/autotools_configure_test.py b/conans/test/build_helpers/autotools_configure_test.py
--- a/conans/test/build_helpers/autotools_configure_test.py
+++ b/conans/test/build_helpers/autotools_configure_test.py
@@ -397,7 +397,7 @@ def get_values(this_os, this_arch, setting_os, setting_arch):
 
         build, host, target = get_values("Linux", "x86_64", "Linux", "x86")
         self.assertEquals(build, "x86_64-linux-gnu")
-        self.assertEquals(host, "i686-linux-gnueabi")
+        self.assertEquals(host, "i686-linux-gnu")
         self.assertFalse(target)
 
         build, host, target = get_values("Linux", "x86_64", "Linux", "armv7hf")