From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 33) id AE0EF2F4F; Thu, 3 May 2018 12:33:14 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Thu, 03 May 2018 10:33:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: 18.05 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dpdk@stormmq.com X-Bugzilla-Status: CONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://dpdk.org/tracker/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 35] Does not compile with musl libc: drivers/bus/pci/linux/pci_uio.c X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2018 10:33:14 -0000 https://dpdk.org/tracker/show_bug.cgi?id=3D35 Bug ID: 35 Summary: Does not compile with musl libc: drivers/bus/pci/linux/pci_uio.c Product: DPDK Version: 18.05 Hardware: All OS: All Status: CONFIRMED Severity: normal Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: dpdk@stormmq.com Target Milestone: --- This does not compile on X86 because it assumes the presence of the glibc-o= nly functions `outl_p`, `outw_p` and `outb_p`. This can be fixed reliably for a= ll c libraries and operating systems by simply importing our own definitions, vi= z:- ``` #if defined(RTE_ARCH_X86) #include // Used in pci_uio_ioport_write, these functions are present in glibc // in (without the pci_uio_ prefix) but not in the // musl lib c. static __inline void pci_uio_outl_p(unsigned int value, unsigned short int port) { __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (value), "Nd" (port)); } static __inline void pci_uio_outw_p(unsigned short int value, unsigned short int port) { __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (value), "Nd" (port)); } static __inline void pci_uio_outb_p(unsigned char value, unsigned short int port) { __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (value), "Nd" (port)); } ``` And then prefixing the usages of the glibc-only functions with `pci_uio_`, = eg `outl_p` becomes `pci_uio_outlw_p`. --=20 You are receiving this mail because: You are the assignee for the bug.=